PHP mysqli_affected_rows() Function

PHP mysqli_affected_rows() function is called on a database connection and returns the number of affected rows in the previous MySQL operation.

Syntax

mysqli_affected_rows() Function Parameter

ParameterDescription
Connection :Required parameter. The MySQL connection to be used

mysqli_affected_rows() Function Return Value

Return Value :Returns integer > 0 indicates number of affected rows. 0 if no record affected

mysqli_affected_rows() Function Example