my_ulonglong mysql_affected_rows(MYSQL * mysql);mysql is a connection identifier, which was previously allocated by mysql_init() or mysql_real_connect().
Returns the number of affected rows by the last operation associated with MySQL, if the operation was an "upsert" (, , or ) statement, or UINT64_MAX (0xffffffffffffffff) if the last query failed.