PHP mysqli_dump_debug_info() Function
In this chapter you will learn:
- Definition for PHP mysqli_dump_debug_info() Function
- Syntax for PHP mysqli_dump_debug_info() Function
- Parameter for PHP mysqli_dump_debug_info() Function
- Return for PHP mysqli_dump_debug_info() Function
- Example - dumps debug info into the log
Definition
The mysqli_dump_debug_info() function dumps debugging info into the log.
Syntax
PHP mysqli_dump_debug_info() Function has the following syntax.
mysqli_dump_debug_info(connection);
Parameter
Parameter | Is Required | Description |
---|---|---|
connection | Required. | A link identifier returned by mysqli_connect() or mysqli_init() |
Return
It returns TRUE on success or FALSE on failure.
Example
The following code dumps debug info into the log.
<?php//from j a v a2 s . c om
$con=mysqli_connect("localhost","my_user","my_password","my_db");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_dump_debug_info($con);
mysqli_close($con);
?>
Next chapter...
What you will learn in the next chapter:
- Definition for PHP mysqli_errno() Function
- Syntax for PHP mysqli_errno() Function
- Parameter for PHP mysqli_errno() Function
- Return for PHP mysqli_errno() Function
- Example - Get the last error code for the most recent function call
Home » PHP Tutorial » PHP MySQLi Functions