FUNCTION NAME |
FUNCTION DESCRIPTION |
FUNCTION SYNTAX |
FUNCTION RETURN VALUE |
mysqli::debug()
mysqli_debug()
[mysqli::debug — mysqli_debug – Performs debugging operations] |
This function performs debugging operations using the Fred Fish debugging library. The MySQL client library must be compiled to support debugging in order to use this function. |
Object-oriented style:
mysqli->debug(message);
Procedural style:
mysqli_debug(message);
[message: a string representation of the debugging operation to perform.] |
mysqli::debug() : returns TRUE. |
mysqli::dump_debug_info()
mysqli_dump_debug_info()
[mysqli::dump_debug_info — mysqli_dump_debug_info – Dump debugging information into the log] |
This function is used to dump connection-related debugging information into the MySQL Server log. mysqli::dump_debug_info() is designed to be invoked by a user with the SUPER privilege. |
Object-oriented style:
$mysqli->dump_debug_info();
Procedural style:
mysqli_dump_debug_info(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::dump_debug_info() : returns TRUE on success; FALSE on failure. |
mysqli::$errno()
mysqli_errno()
[mysqli::$errno — mysqli_errno – Returns the error code for the most recent function call] |
This function returns the last error code [‘number’/‘no’] for the most recent MySQLi function call that can succeed or fail. The MySQL header file, errmsg.h , contains a list of client error message numbers; mysqld_error.h lists server error message numbers. A complete list of error message numbers and error messages can be found in the file Docs/mysqld_error.txt of the MySQL source distribution. |
Object-oriented style:
$mysqli->errno;
Procedural style:
mysqli_errno(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::$errno() : returns an error code value for the last function call, if it failed.
A return value of 0 means no error occurred. |
mysqli::$error_list()
mysqli_error_list()
[mysqli::$error_list — mysqli_error_list – Returns a list of errors from the last command executed] |
This function returns an array [‘list’] of errors pertaining to the last MySQLi function call that can succeed or fail. |
Object-oriented style:
$mysqli->error_list;
Procedural style:
mysqli_error_list(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::$error_list() : returns a list of errors, each as an associative array containing the errno, error, and sqlstate. |
mysqli::$error()
mysqli_error()
[mysqli::$error — mysqli_error – Returns a string description of the last error] |
This function returns the last error message for the most recent MySQLi function call that can succeed or fail. |
Object-oriented style:
$mysqli->error;
Procedural style:
mysqli_error(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::$error() : returns a string that describes the error or an empty string if no error occurred. |
mysqli::$field_count()
mysqli_field_count()
[mysqli::$field_count — mysqli_field_count – Returns the number of columns for the most recent query] |
This function returns the number [‘count’] of columns [‘fields’] for the most recent query on the connection represented by $mysqli /mysqli_link . This function can be useful to determine whether a query should have produced a non-empty result set – without knowing the nature of the query – when working with the mysqli_store_result() function. |
Object-oriented style:
$mysqli->field_count;
Procedural style:
mysqli_field_count(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::$field_count() : returns an integer representation of the number of fields in a result set. |
mysqli::get_charset()
mysqli_get_charset()
[mysqli::get_charset — mysqli_get_charset – Returns a character set object] |
This function returns [‘gets’] a character set object, providing several properties of the current, active character set. |
Object-oriented style:
$mysqli->get_charset();
Procedural style:
mysqli_get_charset(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::get_charset() : returns a character set object with the following properties: charset [character set name]; collation [collation name]; dir [directory the charset was fetched from, or “” for built-in character sets]; min_length [minimum character length in bytes]; max_length [maximum character length in bytes]; number [internal character set number]; and state [character set status]. |
mysqli::$client_info()
mysqli::get_client_info()
mysqli_get_client_info()
[mysqli::$client_info — mysqli::get_client_info — mysqli_get_client_info – Get MySQL client info] |
This function returns [‘gets’] a string representation [‘info’] of the MySQL client library version. |
Object-oriented style – flavour one:
$mysqli->client_info;
Object-oriented style – flavour two:
$mysqli->get_client_info();
Procedural style:
mysqli_get_client_info(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::get_client_info() : returns a string representation of the MySQL client library version. |
mysqli::$client_version()
mysqli_get_client_version()
[mysql::$client_version — mysqli_get_client_version – Returns the MySQL client version as an integer] |
This function returns (‘gets’) the MySQL client version number as an integer. It is useful in situations where you need to quickly know if some capability exists. |
Object-oriented style:
$mysqli->client_version;
Procedural style:
mysqli_get_client_version(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::$client_version() : returns a number that represents the MySQL client library version in the following format: [main_version * 10000 + minor_version * 100 + sub_version ]. |
mysqli::get_connection_stats()
mysqli_get_connection_stats()
[mysqli::get_connection_stats — mysqli_get_connection_stats – Returns statistics about the client connection] |
This function returns (‘gets’) statistics (‘stats’) about the client connection. It is only available with mysqlnd . |
Object-oriented style:
$mysqli->get_connection_stats();
Procedural style:
mysqli_get_connection_stats(mysqli_link);
[mysqli_link: a link identifier returned by mysqli_connect() or mysqli_init() ; only required for the procedural style.] |
mysqli::get_connection_stats() : returns an array with connection stats on success; FALSE on failure. The array consists of approximately 120 elements, ranging from bytes_sent to proto_binary_fetched_other. |