On Tue, 10 Jul 2001 22:10, Frédéric Mériot wrote:
> 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

Select category, description from table where whatever order by category, 
description

Then when you display the rows, keep track of the current and previous 
value of $description; if it changes, print the new value.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   Don't stop posting, a good laugh breaks up my day nicely

-- 
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