But this would also include the form field SUBMIT which, obviously, isn't part of the DB. Right?
-----Original Message----- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 11:18 AM To: CF-Talk Subject: Re: Is this possible to do? ----- Original Message ----- From: "Tony Carcieri" <[EMAIL PROTECTED]> --snip-- <cfquery datasource="mydatasource" name="deletethese"> UPDATE mytable SET IsDeleted = 1 <cfloop query="deletethese"> WHERE ID = '#form.ID#' </cfloop> </cfquery> --------------------------- You're submitting a form with one or more checkboxes checked to delete, yeah? Try using the 'form.fieldnames' value and the SQL 'IN' operator. Form.fieldnames should contain a list of all form fields defined in the submission. Checkboxes that aren't checked aren't even defined, so... <cfquery datasource="mydatasource" name="deletethese"> UPDATE mytable SET IsDeleted = 1 WHERE ID IN (#form.fieldnames#) </cfquery> HTH, - Gyrus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

