w3resource

PHP MySQLi: debug() function

mysqli_debug() function / mysqli::debug

The mysqli_debug() function / mysqli::debug is used to perform debugging operations.

Note: In order to use this function, you must compile the MySQL client library to support debugging.

Syntax:

Object oriented style

bool mysqli::debug ( string $message )

Procedural style

bool mysqli_debug ( string $message )

Usage: Procedural style

mysqli_debug(message);

Parameter:

Name Description Required/Optional
massage A string that represents the debugging operation to perform Required

Return value:

Returns TRUE.

Version: PHP 5, PHP 7

Example:

<?php
/* Create a trace file in '/tmp/client.trace' on the local (client) machine: */
mysqli_debug("d:t:o,/tmp/client.trace");
?>

See also

PHP Function Reference

Previous: connect
Next: dump_debug_info



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/php/function-reference/mysqli_debug.php