Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-12-2009, 02:34 AM   PM User | #1
tenshimsm
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
tenshimsm is an unknown quantity at this point
Unhappy query results organized/separated by groups

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)
tenshimsm is offline   Reply With Quote
Old 05-12-2009, 04:16 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
__________________
Fumigator is offline   Reply With Quote
Old 05-12-2009, 05:46 PM   PM User | #3
tenshimsm
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
tenshimsm is an unknown quantity at this point

Thanks I'll try it?
tenshimsm is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:07 AM.


Advertisement
Log in to turn off these ads.