tibberous Posted May 13, 2009 Share Posted May 13, 2009 I need to ask the user for a start time and date, and then save it. Then I need to ask them how long they want something to show up. When someone visits the site, I need to make something show up if it is after the start time but still during the show time. I don't know whether I should try and use mysqls date and time functions, or if I should just use phps timestamps for everything and just put ints into the database. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 13, 2009 Share Posted May 13, 2009 Have a table with start_time and end_time. Both TIMESTAMP. The start_time is the time the user wants that thing to show up and the end_time is when it will stop. In the application, you don't have to make the user select an end_time, you can convert that using PHP before storing it in the DB. 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.