Hello, I have a table of restaurants, I want to store opening times so I can display in real time if the restaurant is open or not. What is the optimal way to store the times ?
Since there is no common denominator for opening times, I thought of having another table with 28 (!!) fields. I'm doubtful this is optimal. The 28 fields would be of type INT : Monday-morning-start Monday-morning-end Monday-afternoon-start Monday-afternoon-end Tuesday-morning-start Tuesday-morning-end Tuesday-afternoon-start Tuesday-afternoon-end etc. and in my PHP page I would determine what day of the week we are and if it's morning or afternoon, and then I would query the database to get the start and end times and verify if we're within the boundaries. Cheers, Damien COLA --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php