cororon Posted January 25, 2008 Share Posted January 25, 2008 Hi Newbie question sorry.I have a mysql database field called "event_start_date" Format is DATEI want use a select statement to get all records where event_start_date is greater than or equal to today.So (using php) I have set $current_date = date(Y-m-d);then tried the select statement SELECT * FROM event WHERE event_start_date >= $current_date ORDER by event_start_dateI doesn't give me an error but gives me all records including those with a date before todays date. Sorts by date order OKBecause it sorts ok I think I must be close, but what have I done so it is not selecting future events only.Many thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.