MysqlndUhConnection::getAffectedRows
Gets the number of affected rows in a previous MySQL operation
&reftitle.description;
public intMysqlndUhConnection::getAffectedRows
mysqlnd_connectionconnection
Gets the number of affected rows in a previous MySQL operation.
&reftitle.parameters;
connection
Mysqlnd connection handle. Do not modify!
&reftitle.returnvalues;
Number of affected rows.
&reftitle.examples;
MysqlndUhConnection::getAffectedRows example
query("DROP TABLE IF EXISTS test");
$mysqli->query("CREATE TABLE test(id INT)");
$mysqli->query("INSERT INTO test(id) VALUES (1)");
var_dump($mysqli->affected_rows);
?>
]]>
&example.outputs;
NULL,
))
proxy::getAffectedRows returns 1
int(1)
]]>
&reftitle.seealso;
mysqlnd_uh_set_connection_proxy
mysqli_affected_rows
mysql_affected_rows