If I get you, there are a couple of ways to approach - here are two
different ways depending on your requirements
<cfquery datasource="#dsn#" name="qBlah">
Select *
>From tBlah
Group By type, description
</cfquery>
Or leave out the group by in the sql and group in your output
<cfoutput group="type">
#type# <br>
<cfoutput group="description">
#description#
</cfoutput>
</cfoutput>
Hth
Steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gareth
Sent: Friday, 10 October 2003 3:17 PM
To: CFAussie Mailing List
Subject: [cfaussie] Looping over a query.
I wish to group a field in a query so that I may output each group of
items.
IE in a recordset rides has MTB, MTB, MTB, ROAD ROAD ROAD. But I want to
seperate the outputs. Is the easiest way just to do a query to find the
unique items then do another couple of queries to output each group
seperately? Or can I do loops based on conditions or something?
If you can work out what I just said and ya can help me out.. that would
be
great.
Cheers
Gareth Edwards.
[EMAIL PROTECTED]
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/