Re: Padding date results

2005-11-07 Thread Marcus Bointon
On 7 Nov 2005, at 01:06, [EMAIL PROTECTED] wrote: A) a database should not respond with data it does not have. Well, it's not really - it's returning a count of 0 for a particular match condition. I could achieve the same result by saying: SELECT DATE_FORMAT(event.timestamp, '%Y-%m-%d')

Re: Padding date results

2005-11-07 Thread Harald Fuchs
In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: Both methods you describe are the commonly used techniques to solve your particular problem. Every RDBMS system I have used responds in exactly the same way to your query. A) a database should not respond with data it does not have.

Re: Padding date results

2005-11-07 Thread SGreen
Marcus Bointon [EMAIL PROTECTED] wrote on 11/07/2005 03:16:08 AM: On 7 Nov 2005, at 01:06, [EMAIL PROTECTED] wrote: A) a database should not respond with data it does not have. Well, it's not really - it's returning a count of 0 for a particular match condition. I could achieve the

Re: Padding date results

2005-11-07 Thread Marcus Bointon
Just wanted to say thanks to all who responded to my date padding question. I think I'm going to stick with my PHP function to fill in blank dates after all. It doesn't require any odd SQL, or any additional created data and suddenly seems much more attractive than it was! Thanks for the

Padding date results

2005-11-06 Thread Marcus Bointon
I'm generating data to use for a php graph-drawing utility where I summarise data into daily counts of events relating to an 'issue' item from an 'event' table via a 'session' table. My queries are currently along these lines: SELECT DATE_FORMAT(event.timestamp, '%Y-%m-%d') AS adate, COUNT

Re: Padding date results

2005-11-06 Thread SGreen
Marcus Bointon [EMAIL PROTECTED] wrote on 11/06/2005 05:53:50 PM: I'm generating data to use for a php graph-drawing utility where I summarise data into daily counts of events relating to an 'issue' item from an 'event' table via a 'session' table. My queries are currently along these