After working on field names on the form a bit, Jim McAtee's solution works
great.  Thanks Jim, I really appreciate it...


<cfparam name="form.AO_ORDER" default="">
<cfloop index="ITEM" list="#form.AO_ORDER#">
  <cfif IsDefined("form.AO_QUANT_#item#")>
    <cfset QUANTITY = Val(Evaluate("form.AO_QUANT_#item#"))>
    <cfif QUANTITY neq 0>
      <cfquery name="ORDERS" datasource="AO_LITERATURE">
      INSERT INTO PRODUCT_ORDERS (ORDER_ID, AO_ORDER, AO_QUANT)
      VALUES ('#CLIENT_ID#', '#ITEM#', '#QUANTITY#')
      </CFQUERY>
    </cfif>
  </cfif>
</cfloop>

--
Les Mizzell
****************
Who Needs Intel?
ATHLON INSIDE!



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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to