brown2005 Posted August 1, 2009 Share Posted August 1, 2009 SELECT * FROM events ORDER BY events_date ASC is what I have at the moment, but I want to change that to only include dates today and in the future.. Link to comment https://forums.phpfreaks.com/topic/168410-solved-select-date-today-or-in-future/ Share on other sites More sharing options...
gevans Posted August 1, 2009 Share Posted August 1, 2009 What field type is events_date? Link to comment https://forums.phpfreaks.com/topic/168410-solved-select-date-today-or-in-future/#findComment-888368 Share on other sites More sharing options...
brown2005 Posted August 1, 2009 Author Share Posted August 1, 2009 What field type is events_date? date Link to comment https://forums.phpfreaks.com/topic/168410-solved-select-date-today-or-in-future/#findComment-888371 Share on other sites More sharing options...
gevans Posted August 1, 2009 Share Posted August 1, 2009 SELECT * FROM `events` WHERE CURDATE() <= `events_date` ORDER BY `events_date` ASC; That should do the trick Link to comment https://forums.phpfreaks.com/topic/168410-solved-select-date-today-or-in-future/#findComment-888373 Share on other sites More sharing options...
brown2005 Posted August 1, 2009 Author Share Posted August 1, 2009 SELECT * FROM `events` WHERE CURDATE() <= `events_date` ORDER BY `events_date` ASC; That should do the trick thanks very much... Link to comment https://forums.phpfreaks.com/topic/168410-solved-select-date-today-or-in-future/#findComment-888375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.