php man page for mysqli_error_list

Query: mysqli_error_list

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

MYSQLI_ERROR_LIST(3)							 1						      MYSQLI_ERROR_LIST(3)

mysqli::$error_list - Returns a list of errors from the last command executed

       Object oriented style

SYNOPSIS
array$mysqli->error_list ()
DESCRIPTION
Procedural style array mysqli_error_list (mysqli $link) Returns a array of errors for the most recent MySQLi function call that can succeed or fail.
PARAMETERS
o $ link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3)
RETURN VALUES
A list of errors, each as an associative array containing the errno, error, and sqlstate.
EXAMPLES
Example #1 $mysqli->error_list example Object oriented style <?php $mysqli = new mysqli("localhost", "nobody", ""); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } if (!$mysqli->query("SET a=1")) { print_r($mysqli->error_list); } /* close connection */ $mysqli->close(); ?> Procedural style <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } if (!mysqli_query($link, "SET a=1")) { print_r(mysqli_error_list($link)); } /* close connection */ mysqli_close($link); ?> The above examples will output: Array ( [0] => Array ( [errno] => 1193 [sqlstate] => HY000 [error] => Unknown system variable 'a' ) )
SEE ALSO
mysqli_connect_errno(3), mysqli_connect_error(3), mysqli_error(3), mysqli_sqlstate(3). PHP Documentation Group MYSQLI_ERROR_LIST(3)
Related Man Pages
mysqli_autocommit(3) - php
mysqli_character_set_name(3) - php
mysqli_error_list(3) - php
mysqli_get_host_info(3) - php
mysqli_multi_query(3) - php
Similar Topics in the Unix Linux Community
FYI: vbPortal style removed.... too many errors
vBadvanced style forum
Executing a command line in a directory and its subdirectories
Find and replace in multiple files
Transistion to php mysqli