We help IT Professionals succeed at work.

Update multiple records from a list

earwig75
earwig75 asked
on
191 Views
Last Modified: 2014-08-14
I have a text field and some checkboxes. When the form is submitted the check boxes create a list. The field is called "selected". So, After the form is submitted I have a 2 fields, one is a list of numbers(selected)  like this 3,7,9,10 and a value from the text box "car",

The values from "Selected" are the IDs from each record i would like to update. So, if the boxes 5,6,7 were checked I want to update records with ID 5,6,7 with the value from the text box.

Could someone assist with this? I'd like to avoid having a query in a loop. Thank you.
Comment
Watch Question

CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you, I don't know why I forgot about "IN". I did have to do it this way though: IN (<cfqueryparam value = "#form.SELECTED#" list="true" CFSQLType = "CF_SQL_BIGINT">)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.