Thank you


"Elias" <[EMAIL PROTECTED]> skrev i melding
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> select count(*) from test1
> where
> MINUTE(tm1) >= 15
> and
> MINUTE(tm1) <= 30
> and
> HOUR(tm1)=12
>
> this query will return you on column containing how many record found in
> that time range, same as how many customers where surfed at that time
> where 30-15=interval
> and 12 is the hour you're checking in!
>
> "David Tandberg-Johansen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 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
> >
> >
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to