Update multiple records with one submit?
i can't life of me figure out how this. have checkboxes primary key id's listed value in repeat region. want perform update on 2 columns id's checked.
sudeo code
<form>
<cfoutput query ....
other textfields...
<input name="checkbox" type="checkbox" id="checkbox" value="#table.id#" />
</cfoutput>
submit button
</form>
my update statement:
update table
set column1 = 1, column2 ='whatever'
where id in (<cfqueryparam cfsqltype="cf_sql_integer" value="#trim(form.checkbox)#">)
</cfquery>
it updates if check 1 box, nothing when more 1 selected.
i tried looping on update statement nothing seems work.
you need use list attribute of cfqueryparam.
More discussions in Database Access
adobe
Comments
Post a Comment