mysql_errno

int mysql_errno([mysql link connection]) 

Gets the error code from the last MySQL operation.

Returns:

Integer on success; FALSE on error

Description:

mysql_errno() returns the MySQL error code from the last MySQL function call that invoked a MySQL client routine. If no error occurred, 0 is returned. In many cases, developers will find the mysql_error() function more useful than mysql_errno(), as it returns a human-readable error message. The error codes are quite useful when dealing with sites that support multiple languages, allowing developers to more easily deliver error messages in multiple languages.

There are more than 200 error codes. MySQL provides a series of convenience constants for these codes.You can get a current version ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.