Quote:
Originally posted by futureal
You should be able to compare it to a string containing today's date. Use something like this to get today's date:
PHP Code:
$today = date("Y-m-d",time());
And from there, you can just do a normal WHERE clause, such as "WHERE calendardate > $today" or whatever you need.
|
I tried that. You can't compare strings like that.
2002-12-15 >= 2002-12-18 doesn't work.
I think I need to compare them in timestamp format but I can't figure out a way to do that.
This doesn't work:
SELECT eventdate FROM calendar_events WHERE eventdate >= $today
I think I need to somehow convert the selected
eventdate to timestamp format, but I haven't been able to figure out how to convert the selection in a WHERE clause... I'm beginning to think it's not possible.