sql - About strtotime -
i stored data created datetime(y-m-d h:i:s) using strtotime function in database. need find stored data using year value. how can in php or sql query?
this sql return data 2014 only, assuming have stored data in field datetime data type:
select * mytable datefield >= '20140101' , datefield < '20150101'
Comments
Post a Comment