PHP mysqli_sqlstate() Function
Return the SQLSTATE error code of the last MySQL operation:
Definition and Usage
The mysqli_sqlstate() function returns the SQLSTATE error code of the last error.
The error code consists of five characters. "00000" indicates no error. The values are specified by ANSI SQL and ODBC.
Syntax
mysqli_sqlstate(
connection
)
;
| Parameters | Description |
|---|---|
| connection | Required. Specifies the MySQL connection to use. |
Technical Details
| Return Value: | Returns a string containing the SQLSTATE error code of the last error. |
|---|---|
| PHP Version: | 5+ |
PHP mysqli Reference Manual