Oracle 5.0 Reference Manual page 2660

Table of Contents

Advertisement

Examples
The example assumes that
connection pool.
Example 20.298.
<?php
$link = new mysqli("myapp", "user", "password", "database");
$res = $link->query("SELECT 1 FROM DUAL");
var_dump(mysqlnd_ms_get_last_used_connection($link));
?>
The above example will output:
array(10) {
["scheme"]=>
string(22) "unix:///tmp/mysql.sock"
["host_info"]=>
string(25) "Localhost via UNIX socket"
["host"]=>
string(0) ""
["port"]=>
int(3306)
["socket_or_pipe"]=>
string(15) "/tmp/mysql.sock"
["thread_id"]=>
int(46253)
["last_message"]=>
string(0) ""
["errno"]=>
int(0)
["error"]=>
string(0) ""
["sqlstate"]=>
string(5) "00000"
}
20.7.6.8.3.
mysqlnd_ms_get_stats
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysqlnd_ms_get_stats
Returns query distribution and connection statistics
Description
array mysqlnd_ms_get_stats();
Returns an array of statistics collected by the replication and load balancing plugin.
The PHP configuration setting
statistics. The collection of statistics is disabled by default for performance reasons.
The scope of the statistics is the
may handle one or multiple requests.
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
Note
mysqlnd_ms_get_last_used_connection
PECL mysqlnd_ms >> 1.1.0. Internally, it is using a
available with PHP 5.3.
refers to a plugin configuration file section and represents a
myapp
mysqlnd_ms_get_last_used_connection
mysqlnd_ms.collect_statistics
process. Depending on your deployment model a
PHP
2640
requires PHP >= 5.4.0 and
library C call not
mysqlnd
example
controls the collection of
PHP
process

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents