Get number of rows matched by UPDATE query with PHP mysqli

I used the following code:

// Parse the digits from the info string that has the following format:
// Rows matched: 0 Changed: 0 Warnings: 0
preg_match_all('!\d+!', $mysqli->info, $m);
return $m[0][0]; 

Leave a Comment