Same name in this branch
  1. 4.7.x includes/database.pgsql.inc \db_affected_rows()
  2. 4.7.x includes/database.mysqli.inc \db_affected_rows()
  3. 4.7.x includes/database.mysql.inc \db_affected_rows()
Same name and namespace in other branches
  1. 4.6.x includes/database.pgsql.inc \db_affected_rows()
  2. 4.6.x includes/database.mysql.inc \db_affected_rows()
  3. 5.x includes/database.pgsql.inc \db_affected_rows()
  4. 5.x includes/database.mysqli.inc \db_affected_rows()
  5. 5.x includes/database.mysql.inc \db_affected_rows()
  6. 6.x includes/database.pgsql.inc \db_affected_rows()
  7. 6.x includes/database.mysqli.inc \db_affected_rows()
  8. 6.x includes/database.mysql.inc \db_affected_rows()

Determine the number of rows changed by the preceding query.

Related topics

File

includes/database.mysqli.inc, line 210
Database interface code for MySQL database servers using the mysqli client libraries. mysqli is included in PHP 5 by default and allows developers to use the advanced features of MySQL 4.1.x, 5.0.x and beyond.

Code

function db_affected_rows() {
  global $active_db;

  /* mysqli connection resource */
  return mysqli_affected_rows($active_db);
}