You need to sort your SELECT statement, right now data is coming back any
old way (well, probably how it is stored in the table). Add an ORDER BY
clause.
--- Ben
-----Original Message-----
From: Koo Pai Lao [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 4:59 PM
To: CF-Talk
Subject: Group Query I going Crazy!!!
ok, for some reason it doesn't come out grouped as I want it to!! anyone
know why??? I want it to come out like this...
1--Family Fun 4 Package 22.0000
1--sdffdsdf 22.0000
2--Monkey Bear 22.0000
2--dasw 2.0000
2--asdads 44.0000
but it comes out in this order instead!!!
1--sdffdsdf 22.0000
2--Monkey Bear 22.0000
2--dasw 2.0000
1--Family Fun 4 Package 22.0000
2--asdads 44.0000
here's the code
<CFQUERY DATASOURCE=#dsn# name="get_prod">
SELECT name, price, show, prod_type_id, id
FROM prod
</cfquery>
<TABLE CELLSPACING="4" CELLPADDING="0" BORDER="0" bgcolor="#E7E7DA">
<cfoutput query="get_prod" group="prod_type_id">
<TR>
<TD>#Prod_type_id#--#name# </td><TD>#price# &nbs
p;</td>
</tr>
</cfoutput>
</table>
PLEASE HELP!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists