Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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)

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Read this post for information how to echo headers (such as your date field) above detail rows:

    "While" data sorting?

    Make sure you ORDER BY date.

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks I'll try it?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •