only1perky Posted February 27, 2009 Share Posted February 27, 2009 Hi Guys, Can you please help me out because I really don't know where to start. I have a page displaying current events and one displaying future events. My database table "events" contains fields for the start date and the end date (both stored a date). What I would like to do is have my code sort which rows have started already, which are yet to start and maybe even delete the ones which have passed. Can someone advise me on how to do this so i can query the database and automatically update both current and future events pages. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/147238-check-if-field-date-has-passed/ Share on other sites More sharing options...
RussellReal Posted February 28, 2009 Share Posted February 28, 2009 assuming you're using DATE fields in sql DELETE FROM `events` WHERE `eventEnd` < NOW() Quote Link to comment https://forums.phpfreaks.com/topic/147238-check-if-field-date-has-passed/#findComment-772966 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.