Correct, but if a filed being 'GROUPED' in CF is not ORDERed in SQL, then
disinct items in the 'outer loop' may beoutput more than once.
For example:

<cfset test = QueryNew('name,item') />

<cfset queryAddRow(test,6) />

<cfset querySetCell(test,'name','Bob',1) />
<cfset querySetCell(test,'item','book',1) />
<cfset querySetCell(test,'name','Bob',2) />
<cfset querySetCell(test,'item','ball',2) />
<cfset querySetCell(test,'name','Jane',3) />
<cfset querySetCell(test,'item','book',3) />
<cfset querySetCell(test,'name','Mary',4) />
<cfset querySetCell(test,'item','dress',4) />
<cfset querySetCell(test,'name','Jane',5) />
<cfset querySetCell(test,'item','shoe',5) />
<cfset querySetCell(test,'name','Bob',6) />
<cfset querySetCell(test,'item','bat',6) />

<cfoutput query="test" group="name">
#name#<br/>
<cfoutput>--#item#<br/></cfoutput>
</cfoutput>

Will give you:

Bob
--book
--ball
Jane
--book
Mary
--dress
Jane
--shoe
Bob
--bat

Also the GROUP BY clasue in SQL is a different beast than the group
attribute in <cfquery>

On 4/11/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
>
> CF doesn't care if the records are actually in order, it just processes
> the outer loop when there's a change of value.
>
>

--
Scott Stroz
Boyzoid.com
___________________________
Some days you are the dog,
Some days you are the tree.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237467
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to