Hi,
How would I loop over a structure of this kind?
<cfset sCodes=structnew()>
<cfoutput query="q824">
<cfset cKey=q824.exception_code>
<cfif not(StructKeyExists(sCodes, ckey))>
<cfset sCodes[cKey]=structnew()>
<cfset sCodes[cKey].total=0>
</cfif>
<cfset sCodes[cKey].total=sCodes[cKey].total+1>
</cfoutput>
I need all "cKey" values (not the total)
I tried <cfloop collection="sCodes" item="x"> to no avail. I keep getting:
Loop error Invalid collection "sCodes" - must be a valid struct or COM object
Tks/Rgds
Paolo Cesana
IT Development Mgr.
"Electricity is not the result of a series of upgrades to the candle"
Auth. unknown
Miami International Forwarders (MIF)
Phone: (305)594-0038 Ext. 7326
Fax: (305)593-0431
<mailto:[EMAIL PROTECTED]>
<http://www.mif.com/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm