You are here : phpmysqlimysqli_error_list

mysqli_error_list() - mysqli

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


Syntax

mysqli_error_list(connection);


Example

<?php
$con=mysqli_connect("localhost","my_user","my_password","my_db");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

// Perform a query, check for error
if (!mysqli_query($con,"INSERT INTO Persons (FirstName) VALUES ('Glenn')"))
  {
  print_r(mysqli_error_list($con));
  }

mysqli_close($con);
?>


Output / Return Value


Limitations


Alternatives / See Also


Reference