How can I find all the records for a single year from a db that has a datetime column (in MySQL)?
This seems to work:
SELECT * from mytable WHERE tstamp < '2003-01-01 00:00:00' AND tstamp > '2002-01-01 00:00:00'
But this doesn't: SELECT * from mytable WHERE tstamp LIKE '2002%'
Is there a simpler way than the first one?
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php