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.
Load data into an XML variable and update in bulk
You should be able to put your loop inside the
cfquery