[PHP] Re: How make the time

2001-07-31 Thread Richard Lynch
>The client wants to get a report written out over each hour like this: > >11:002 Customers >11:1532 Customers >11:3012 Customers >... >... >22:3014 Customers Assuming you only allow them to put in valid :15 minute data in the first place: $query = "select time_field, count(*) fr

[PHP] Re: How make the time

2001-07-18 Thread David Tandberg-Johansen
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 ra

[PHP] Re: How make the time

2001-07-18 Thread elias
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! "D

[PHP] Re: How make the time

2001-07-18 Thread elias
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! "D