PHP mysqli_error() Function

PHP mysqli_error() function is used to get last error message for the most recent MySQLi function call.

Syntax

mysqli_error() Function Parameter

ParameterDescription
connection :Required parameter. The MySQL connection to be used

mysqli_error() Function Return Value

Return Values :A string that describes the error. An empty string if no error occurred.

mysqli_error() Function Example