Posted on 2003-03-23
I am currently working on a project which requires me to "sort" out the data that i retreive from a list. Here is what i have on the action page:
<CFinput type="checkbox" name="processing" value="#OrderNo#, #ProductNo#">
<INPUT type="hidden" name="ProductNo" value="#GetInfo.ProductNo#">
<INPUT type="hidden" name="OrderNo" value="#GetInfo.OrderNo#">
I have created a checkbox. For each order, there can be many items. When the selected checkboxes are checked, it will bring me to the action page. I have created a list on the action page which looks like this:
<cfloop index="check2" list="#form.cooking#">
After this, I have to update the database according to the order number and product number. Currently, if i have 1 order and 2 items in that order my list will look like this "1,1,1,2". What i need is to sort out the data and update a table in the database. With the list i have now, the database would not be able to understand that order 1 has 2 items numbered product 1 and product 2.
Thanks in advance to anybody who will spare some time to read the problem and help me out..