You can always add a counter:

<cfloop query="qGetTitleList" group="reviewpk">
        .... code to display non grouped detail ....
        <cfset iCounter = 1>
        <cfoutput>
                <cfif iCounter LT 10>
                        ....code for first grouping...
                        <cfset iCounter = iCounter +1>  (or <cfset iCounter
+= 1> if using CF 8)
                <cfelse>
                        ....code to display to prepare for second grouping
....
                        <cfset iCounter = 1>
                </cfif>
        </cfoutput>
</cfloop>

Something like that.  I didn't test the above, so it's probably buggy, but
you get the idea.

Dave

-----Original Message-----
From: John Ahlen [mailto:[email protected]] 
Sent: Tuesday, December 16, 2008 1:21 AM
To: cf-newbie
Subject: SQL/cfloop question

Hello All,

I hope i'm providing enough info for this question.

I have a query that retrieves from several different tables.  Because the
result list can run into the hundreds, I use

<cfloop query="qGetTitleList" startrow="#URL.startRow#" endrow="#endRow#" >

to group the output by tens.

I recently added a left join to the query that could include multiple rows
from another table.  When I run the query, a record from the first query
repeats itself as many times as a matching record occurs in the second
table.

If I strip out the cfloop tag and use only

<cfoutput query="qGetTitleLIst" group="reviewpk">

The output runs as I expect it to.  This of course does not allow for
grouping by 10.

Any suggestions?

Thanks in advance,

jahlen 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4235
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to