...

View Full Version : query results organized/separated by groups



tenshimsm
05-12-2009, 03: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

2009-01-02
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)

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

http://codingforums.com/showthread.php?t=165969

Make sure you ORDER BY date.

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum