Change
findnocase(field, "_")
To
findnocase("_", field)
..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-----Original Message-----
From: Jason Congerton [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 15, 2008 6:18 AM
To: CF-Talk
Subject: looping through a form
Hi
I posted a question a few weeks ago regarding looping through form results,
and someone posted the code below for me to try, however no records are
updated when the form is submited. In fact nothing is happening between the
<cfif findnocase(field, '_')> statement. Any pointers?
Thanks
<cfloop collection="#form#" item="field">
<cfif findnocase(field, "_")>
<cfset id = listgetat(field,2,'_')>
<cfset value = form[field]>
<!--- do whatever with id and value--->
<cfquery datasource="#application.dsn#" name="updateProducts">
Update products
Set price = #value#
WHERE productID = #id#
</cfquery>
</cfif>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305308
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4