Make sure you are ordering by LocationName, then

<cfoutput query="..." group="LocationName">
    <h1>#LocationName#</h1>
    <cfoutput>
        #Ball#
    </cfoutput>
</cfoutput>

Is that what you mean??

----- Original Message -----
From: "JLH All Turbo" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, August 10, 2002 1:36 AM
Subject: SQL Help


> How can I structure a query and it's output to pull all the records out
that
> have a certain field = something and have them grouped by another field...
>
> And then in the output put a header for each group?
>
> In a DB with baseballs and footballs and different locations for the
balls.
>
> Pull all balls out and group by locations
>
> So the output would be something along the lines of
>
> LOCATION1NAME
> baseball1
> baseball2
> football1
> football2
>
> LOCATION2NAME
> baseball3
> baseball4
> football3
> football4
>
> etc and run through all the locations and all the balls that pertain to
> those locations.
>  I can get the query down, just outputting the <cfoutput> to change the
> header of the tables is where I'm running in to problems.
>
> Maybe you guys can help?
>
> J
>
>
> 
______________________________________________________________________
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

Reply via email to