Oracle 5.0 Reference Manual page 2757

Table of Contents

Advertisement

Return Values
Last message. Trying to return a string longer than 511 bytes will cause an error of the type
E_WARNING
Examples
Example 20.349.
<?php
class proxy extends MysqlndUhConnection {
public function getLastMessage($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::getLastMessage($res);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
return $ret;
}
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost", "root", "", "test");
var_dump($mysqli->info);
$mysqli->query("DROP TABLE IF EXISTS test");
var_dump($mysqli->info);
?>
The above example will output:
proxy::getLastMessage(array (
0 => NULL,
))
proxy::getLastMessage returns ''
string(0) ""
proxy::getLastMessage(array (
0 => NULL,
))
proxy::getLastMessage returns ''
string(0) ""
See Also
mysqlnd_uh_set_connection_proxy
mysqli_info
mysql_info
20.7.8.7.15.
MysqlndUhConnection::getProtocolInformation
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhConnection::getProtocolInformation
Returns the version of the MySQL protocol used
Description
public string MysqlndUhConnection::getProtocolInformation(
mysqlnd_connection connection);
Returns the version of the MySQL protocol used.
Parameters
connection
Mysqlnd user handler plugin (mysqlnd_uh)
and result in the string being truncated.
MysqlndUhConnection::getLastMessage
Mysqlnd connection handle. Do not modify!
example
2737

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents