Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_sqlstate() Function

PHP mysqli_sqlstate() Function

PHP mysqli Reference Manual PHP mysqli Reference Manual

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 PHP mysqli Reference Manual