How can I find the current row of a list loop?
I had the old school cfset I = I + 1 in my SQL query, but it kept
barfing having it in there inside my loop in my SQL query.
I am trying to basically say, look for this value , and if this is not
the last of the comma delimited list sent me, then put OR, otherwise
move on.
<cfset listnum = listlen(form.area)>
<cfif form.area neq ''>
AND (
<cfloop list="#form.area#" index="m">
customer_contact.phone LIKE '%#m#%' <cfif listnum LT
currentrow>OR</cfif>
</cfloop>
)
</cfif>
Any ideas? Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198251
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54