The older mysql extension has the CLIENT_FOUND_ROWS connection flag, but I couldn\'t find any equivalent for mysqli.
CLIENT_FOUND_ROWS
I have an up
up
You could run SELECT COUNT(*) with the same WHERE clause before running the UPDATE. That will give you a count of the number of rows that would be matched.
SELECT COUNT(*)