When you run a cfquery using SELECT, the number of records returned is easy to find using #queryname.recordcount# - but what about the other types of SQL queries, our good friends Update, Insert and Delete ? Those query types don't return a total of rows in the same way.
But there's an easy solution ... once again, we can use 'recordcount', but in this case it is a node of the 'result' variable as defined in our cfquery tag.
column1 = '#value1#',
column2 = '#value2#'
WHERE column3 = 1
<cfset recordsChanged = updateResult.recordCount>
That query is just a sample, you could have any 'where' statement, values, etc... but notice the "result" attribute of the cfquery tag, which will accept any variable name you want to use. Then, immediately following the query code, we simply get the 'recordcount' node of the result structure, and we have the number of updated records from the query.
( Note: this example is for mySQL - ymmv with other db types)