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

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -