RE: [PHP] How to fetch a "group by" Query?
| From: | Ben Bleything | Date: | Tue, 10 Jul 2001 15:10:20 +0000 |
| Subject: | RE: [PHP] How to fetch a "group by" Query? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57166@lists.php.net to get a copy of this message | ||
Did you try 'SELECT categorie,item FROM your_table GROUP BY categorie'?
Ben
-----Original Message-----
From: Frédéric Mériot [mailto:frederic@argyro.net]
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: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net