View Full Version : query results organized/separated by groups

05-12-2009, 02:34 AM
What I need?
Let me see... I need to show the results of a query organized by groups of dates. Each task has a date, but each date could contain many tasks. So I want to separate the results by date like an calendar-agenda.

$sql = "SELECT date,task FROM tasks"
should show

task 1
task 2
task 3

instead of

2009-01-02 task 1
2009-01-02 task 2
2009-01-02 task 3

I know that I was not clear while describing my "doubt" and I'm sorry. I'm a little tired. ;o)

05-12-2009, 04:16 PM
Read this post for information how to echo headers (such as your date field) above detail rows:


Make sure you ORDER BY date.

05-12-2009, 05:46 PM
Thanks I'll try it?