The mysqli_affected_rows() function returns the number of affected rows in the previous SELECT, INSERT, UPDATE, REPLACE, or DELETE query.
mysqli_affected_rows(connection);
32"); echo "Affected rows: " . mysqli_affected_rows($con); mysqli_close($con); ?>
PDO and mysql_affected_rows()