First thing that comes to my mind is a loop counter:

<cfset counter=1>

<cfloop query="test" startrow="1" endrow="#rows.RecordCount#">

       <cfif cfloop.row EQ 1> 
             We are on row 1
       <cfelse cfloop.row GT 1>
             We are not on row 1
       </cfif>

       <cfset counter = counter + 1>

</cfloop>


Brian

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 8:45 AM
To: CF-Talk
Subject: Easy CFLOOP Question


is there a way to find out what row i am on in a cfloop?  

Like inside my loop, call a condition like this

<cfloop query="test" startrow="1" endrow="#rows.RecordCount#">

       <cfif cfloop.row EQ 1> 
             We are on row 1
       <cfelse cfloop.row GT 1>
             We are not on row 1
       </cfif>

</cfloop>
Is there a way to do this?  Some variable i am overlooking?

Thanks

Kevin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to