I would just set up a counter. Something like this.
<CFSET CNTR = 0>
<cfoutput query="getLogo1">
<cfloop list="#lchoices#" index="Logo1">
<CFIF #Trim(Logo1)# IS #Trim(LogoID)#>
<CFSET CNTR = CNTR + 1>
<input type="radio" name="logoselection"
value="#LogoID#"<CFIF Logo1 IS 1>Checked</CFIF>><img
src="../images/#LogoImage#"alt="" border="0"
align="absmiddle"><br>
</cfif>
</cfloop>
</cfoutput>
<CFOUTPUT>#CNTR#</CFOUTPUT> <!--- Contains the number of "hits" --->
HTH
-----Original Message-----
From: Dave Clay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 9:03 AM
To: CF-Talk
Subject: Counting Outputs
Is there anyway to count the number of matches for the IF statement:
<CFIF #Trim(Logo1)# IS #Trim(LogoID)#>.
I want to CHECKed the radio button when <CFIF Logo1 IS 1 OR the count
is
1.
Hope someone can help.
Dave Clay
<cfoutput query="getLogo1">
<cfloop list="#lchoices#" index="Logo1">
<CFIF #Trim(Logo1)# IS #Trim(LogoID)#>
<input type="radio" name="logoselection"
value="#LogoID#"<CFIF Logo1 IS 1>Checked</CFIF>><img
src="../images/#LogoImage#"alt="" border="0"
align="absmiddle"><br>
</cfif>
</cfloop>
</cfoutput>
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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