PHP3 Manual
PrevNext

mysql_errno

mysql_errno -- returns error number of last mysql call

Description

int mysql_errno();

Errors coming back from the mySQL database backend no longer issue warnings. Instead, use these functions to retrieve the error number.

<?php
mysql_connect("marliesle");
echo mysql_errno().": ".mysql_error()."<BR>";
mysql_select_db("nonexistentdb");
echo mysql_errno().": ".mysql_error()."<BR>";
$conn = mysql_query("SELECT * FROM nonexistenttable");
echo mysql_errno().": ".mysql_error()."<BR>";
?>

See also: mysql_error()


PrevHomeNext
mysql_drop_dbUpmysql_error