How make the time

From: Date: Tue, 17 Jul 2001 23:40:23 +0000
Subject: How make the time
Groups: php.general 
Request: Send a blank email to php-general+get-58353@lists.php.net to get a copy of this message
Hello! I am trying to make an online booking script for a client (restaurant), and I am using MySQL to store the booking information The restaurant have openings hour from 11:00 -> 01:00, but do only take reservation between 11:00->22:30. The client wants to get a report written out over each hour like this: 11:00 2 Customers 11:15 32 Customers 11:30 12 Customers .... .... 22:30 14 Customers In the MySQL table I have set up the time field as 'time' with 00:00:00 as default. Everything is ok, but I am stuck on how to make this report. The customer have set an interval of 15 mnutes between possible time to book, so I have to make an 'SELECT'-query based on when the restaurant opens to the time of the last possible booking time. But how do I make the timeset (11:00:00 and up to 22:30:00) My far out example: interval = 15; while (time<=endtime){ time=starttime DBCONNECTION Select * from booking wher tine_field='time' time = time+interval } Do anyone have any tips on how I can solve this David

« previous php.general (#58353) next »