Re: SELECT question - query for records over a series of dates

2005-08-17 Thread Dan Tappin
I think you might be one to something here... is there such a thing as a while loop in MySQL? i.e. can I fill a table with data via a MySQL query? I guess I could do it via PHP... I could create a temp table with one column of dates for the range I am looking for and then LEFT JOIN my

Re: SELECT question - query for records over a series of dates

2005-08-17 Thread Michael Stassen
Dan Tappin wrote: I think you might be one to something here... is there such a thing as a while loop in MySQL? i.e. can I fill a table with data via a MySQL query? I guess I could do it via PHP... I could create a temp table with one column of dates for the range I am looking for and

SELECT question - query for records over a series of dates

2005-08-16 Thread Dan Tappin
I have a table full of data... a log of sorts. Each row has a timestamp. I want to generate some reports based on this data. For example I want a COUNT(*) of the rows for each day for the past week, 30 days, 12 months etc. I have no problem generating the query but I am stuck on a

Re: SELECT question - query for records over a series of dates

2005-08-16 Thread Daniel Kasak
Dan Tappin wrote: I have a table full of data... a log of sorts. Each row has a timestamp. I want to generate some reports based on this data. For example I want a COUNT(*) of the rows for each day for the past week, 30 days, 12 months etc. I have no problem generating the query but I

Re: SELECT question - query for records over a series of dates

2005-08-16 Thread Michael Stassen
Dan Tappin wrote: I have a table full of data... a log of sorts. Each row has a timestamp. I want to generate some reports based on this data. For example I want a COUNT(*) of the rows for each day for the past week, 30 days, 12 months etc. I have no problem generating the query but I am