Did you try 'SELECT categorie,item FROM your_table GROUP BY categorie'?

Ben

-----Original Message-----
From: Frédéric Mériot [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 10, 2001 5:41 AM
To: PHP General List
Subject: [PHP] How to fetch a "group by" Query?

Hello (again)

I've got a query which extract titles and categories with a group by on
the
categorie. Is there a simple way to display rows like this (without
doing a
second query ):

Categorie A
    -titi
    -toto
    -tutu

Categorie B
    -bibi
    -nini
    -fififi

Categorie C
    -titi
    -toto
    -tutu

... etc

With cold fusion (for those who know) I want to do the same as <CFOUTPUT
QUERY="myquery" GROUP="categorie">

Thanks




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to