You could just alter your query slightly and let SQL do the counting for you. 

-----Original Message-----
From: Toby King [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 2:22 PM
To: CF-Talk
Subject: cfoutput group with totals

<cfoutput query="getAuthorsAndBooks" group="authorname"> <b>#authorName#</b> 
<ul> <cfoutput> <li>#bookTitle#</li> </cfoutput> </ul> </cfoutput>


Hi there

I understand the piece of code well – so that’s cool – 
just want to try and enhance the code a fraction.

I want to try and place after the list of books for each author a count of the 
number of books.

I tried this but instead of getting the count once – I got the count 3 
times if there were 3 books, 4 if there were 4 books 5 etc and so on.

Hoe do you include a count after the books and before the next author name.

Thanks




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293030
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to