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



Follow us on Facebook and Twitter for latest update.