I thought it was the simplest query in the world - used it a million times before - and now it fails.
I have a table that has a date field called tdate and it is date format, (yyyy-mm-dd). There are only 6 dates in it right now:
0000-00-00
1997-10-07
2002-06-14
2003-12-16
2004-04-29
2004-05-23
I have $today = date('Y-m-d');
I run this query:
SELECT tdate FROM table WHERE tdate > $today ORDER BY tdate
It returns ALL of the dates except 0000-00-00. ??
If it was failing, would it not also return the 0000-00-00 date?
I should see only the last 2 entries!! How much more simple can a query be? What am I missing?
Thanks to anyone who can return my sanity.