TheFilmGod Posted September 11, 2007 Share Posted September 11, 2007 Hey, I was hoping someone can give me some ideas to create a php feature. I'm making a site for the school's student council. They want me to make a dynamic thing where there is a date and time of the next meeting on the homepage. I was hoping if anyone has a creative idea of doing this. PHP - wise. Should I make a table in mysql, with a row for each date and have php check the time and the next meeting to be shown? How would YOU, as a developer go around doing this? General idea and basic php method would be helpulf. Thanks! ;D Quote Link to comment Share on other sites More sharing options...
liebs19 Posted September 11, 2007 Share Posted September 11, 2007 That would probably be the best idea. Just ORDER BY the date in your query, then cycle through them until you find one that has not already passed. Quote Link to comment Share on other sites More sharing options...
effigy Posted September 11, 2007 Share Posted September 11, 2007 SELECT fields FROM table WHERE meeting_date >= NOW() ORDER BY meeting_date LIMIT 1 Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted September 11, 2007 Share Posted September 11, 2007 Should I make a table in mysql, with a row for each date and have php check the time and the next meeting to be shown? I'm not really sure how else you'd go about doing it. meetings id | datetime | name | description | notes SELECT datetime, name, description FROM meetings ORDER BY datetime DESC LIMIT 1 Then you just give them an admin page to add, edit, and delete entries. A general page to view all meetings that have occurred along with their notes would be helpful. I'm not really sure what you were looking for as an answer. Quote Link to comment Share on other sites More sharing options...
liebs19 Posted September 11, 2007 Share Posted September 11, 2007 Doh! Yeah, LIMIT 1 instead of doing it by a loop. Quote Link to comment 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.