I have a problem. On one page I have several items that will be discounted, they are being passed in form variables to the next page where the query is being executed. So I have form variables that look like this form.itemid1=1, form.itemdiscount1=40, formitemid2=17, form.itemdiscount2=70, etc.
There could be as many as say 20 of these, or as few as 0. I am passing to the next page all of these items, and discounts, as well as the number of items.
My problem is when I run my query to update the table, I can't put my query in a cfloop and run a counter (e.g. update table set columnname=#form.itemdiscount#counter## where othercolumnname=#form.itemid#counter##) Is there some way I can dynamically do this. The only solution I've come up with so far is nasty and involves cfifing over and over.
There could be as many as say 20 of these, or as few as 0. I am passing to the next page all of these items, and discounts, as well as the number of items.
My problem is when I run my query to update the table, I can't put my query in a cfloop and run a counter (e.g. update table set columnname=#form.itemdiscount#counter## where othercolumnname=#form.itemid#counter##) Is there some way I can dynamically do this. The only solution I've come up with so far is nasty and involves cfifing over and over.