$ret = parent::getServerStatistics($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_stat($mysqli));
?>
The above example will output:
proxy::getServerStatistics(array (
0 => NULL,
))
proxy::getServerStatistics returns 'Uptime: 2059995
string(140) "Uptime: 2059995
See Also
mysqlnd_uh_set_connection_proxy
mysqli_stat
mysql_stat
20.7.8.7.18.
MysqlndUhConnection::getServerVersion
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
MysqlndUhConnection::getServerVersion
Returns the version of the MySQL server as an integer
Description
public int MysqlndUhConnection::getServerVersion(
mysqlnd_connection connection);
Returns the version of the MySQL server as an integer.
Parameters
connection
Return Values
The MySQL version.
Examples
Example 20.353.
<?php
class proxy extends MysqlndUhConnection {
public function getServerVersion($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::getServerVersion($res);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
return $ret;
}
}
mysqlnd_uh_set_connection_proxy(new proxy());
Mysqlnd user handler plugin (mysqlnd_uh)
Threads: 1
Mysqlnd connection handle. Do not modify!
MysqlndUhConnection::getServerVersion
Threads: 1
Questions: 126157
Slow queries: 0
example
2740
Questions: 126157
Slow queries: 0
Opens: 6377
Opens:
Flush tables: 1
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers