The parameters to FindNoCase are back-to-front.

Adrian

-----Original Message-----
From: Jason Congerton [mailto:[EMAIL PROTECTED]
Sent: 15 May 2008 11:18
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:305306
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to