MySQL problem with a Date field
Posted: Fri Apr 13, 2007 7:16 am
I hope this is the right place for this. Sorry if it isn't.
I've quite desperate now to get this problem sorted out.
I am trying to write an SQL statement that will pull out all records in a database where the date is higher than or equil to the current date. I have this:
"SELECT * FROM `events` WHERE `from` >= NOW() ORDER BY `from` ASC LIMIT 1"
'from' is a date field (not datetime).
Which seamed to work until Tuesday. The script was meant to drop the current event and replace it with the next in line. Well, it did it on Monday instead. Does anyone have any ideas on how I can get this to work properly?
I've quite desperate now to get this problem sorted out.
I am trying to write an SQL statement that will pull out all records in a database where the date is higher than or equil to the current date. I have this:
"SELECT * FROM `events` WHERE `from` >= NOW() ORDER BY `from` ASC LIMIT 1"
'from' is a date field (not datetime).
Which seamed to work until Tuesday. The script was meant to drop the current event and replace it with the next in line. Well, it did it on Monday instead. Does anyone have any ideas on how I can get this to work properly?