PHP mysqli_error_list() Function

Object oriented style

array $mysqli->error_list;

Procedural style

array mysqli_error_list ( mysqli $link )

The mysqli_error_list() function returns a list of errors for the most recent function call, if any.

Returns a array of errors for the most recent MySQLi function call that can succeed or fail.

Examples -

Object oriented style

Procedural style

The above examples will output:

Array ( [0] => Array ( [errno] => 1193 [sqlstate] => HY000 [error] => Unknown system variable 'a' ) )

ParameterDescription
linkProcedural style only: A link identifier returned by mysqli_connect() or mysqli_init()

Return Values

A list of errors, each as an associative array containing the errno, error, and sqlstate.