> What if you need to display the count _above_ the enumerated items?
>
> <cfoutput query="xx" group="xxxx">
> #xx.category# (#count# items)<br>
> <cfoutput>
> ....
> </cfoutput>
> </cfoutput>
You have a couple of options. You could bring back the count in your SQL
query, by using COUNT and GROUPing BY the field that you're ORDERing BY now.
Or, you could use a counter and build a string in your nested CFOUTPUT
block, then display the string after getting the count:
<cfoutput query="xx" group="xxxx">
#xx.category#
<cfset counter = 0>
<cfset myoutputstr = "">
<cfoutput>
<cfset counter = counter + 1>
<cfset myoutputstr = myoutputstr & xx.myfield & "<whatever HTML
formatting required> & xx.myotherfield ...>
</cfoutput>
(#counter# items)<br>
#myoutputstr#
</cfoutput>
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
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