Updating multiple rows from a cfquery recordset
问题 Is there a way to update multiple rows of data when the data coming in is from the result of a CFQuery? Currently this run <cfquery> multiple times. Is there a way to do it in one uqery operation? <cfloop query=loc.fixItems> <cfset loc.count++> <cfset var categoryName = loc.fixItems.categoryName> <cfquery> update items set code = <cfqueryparam value="#code#"> where id = <cfqueryparam value="#itemId#"> </cfquery> </cfloop> This can run multiple times and put a heavy load on the server. 回答1: