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.. Quote 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? Quote 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 Quote 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 Quote 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... Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.