Overmyhead2
Programmer
I have been able to insert either Item or Qty but not both.
A cfloop inside of a cfloop is not working..
How can I do a cfloop with 2 lists?
Here is my Action page..
Victoria
A cfloop inside of a cfloop is not working..
How can I do a cfloop with 2 lists?
Here is my Action page..
Code:
<cfif IsDefined("Form.Item")>
<cfloop index="i" list="#form.Item#">
<cfif IsDefined("Form.Qty")>
<cfloop index="x" list="#form.Qty#">
<cfquery datasource="#Datasource#" name="insertItems">
INSERT INTO OrderItems(Qty, OrderDate, SiteID, ItemID)
VALUES('#x#','#SESSION.AUTH.OrderDate#', '#SESSION.AUTH.SiteID#', '#i#')
</cfquery>
</cfloop>
</cfif>
</cfloop>
</cfif>
Victoria