db_error()
Determine whether the previous query caused an error.
includes/database.mysqli.inc, line 185
<?php function db_error() { global $active_db; return mysqli_errno($active_db); } ?>