PHP MySQLi: errno() function
mysqli_errno() function / mysqli::$errno
The mysqli_errno() function / mysqli::$errno return the last error code for the most recent function call, if any.
Syntax:
Object oriented style
int $mysqli->errno;
Procedural style
int mysqli_errno ( mysqli $link )
Usage: Procedural style
mysqli_errno(connection);
Parameter:
Name | Description | Required/Optional |
---|---|---|
connection | Specifies the MySQL connection to use | Required |
Return value:
An error code value for the last call, if it failed. zero means no error occurred.
Version: PHP 5, PHP 7
Example of object oriented style:
Output:
Errorcode: 1193
Example of procedural style:
Output:
Errorcode: 0
Example:
Sample Output:
Errorcode:
See also
Previous: dump_debug_info
Next: error_list
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics