Hi Chris,

You can actually refer to a query as an array...so you could do this..

<cfloop query="qry_show_event_sponsors">
        #eventsponsorname#<cfif
qry_show_event_sponsors.eventsponsorname[qry_show_event_sponsors.recordcount
] NEQ eventsponsorname>,</cfif>

</cfif>

HTH

Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
[EMAIL PROTECTED]


> -----Original Message-----
> From: Chris Martin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 11:13 AM
> To: CF-Talk
> Subject: Finding the last item in a loop
>
>
> IS it possible to find the last item in a loop?
>
> Right now I have this:
>
> <cfloop query="qry_show_event_sponsors">
>       #EventSponserName#,
> </cfloop>
>
> Is it possible to check if the #EventSponsorName#  is the last item in the
> record set, and then not display the comma?  I.E.
>
> <cfloop query="qry_show_event_sponsors">
>       #EventSponserName#<cfif something>,</cfif>
> </cfloop>
>
> Thanks in advance
>
> Chris Martin
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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