|
mysqlnd_ms_get_last_used_connection(PHP >= 5.4.0, PECL mysqlnd_ms >= 1.1.0) mysqlnd_ms_get_last_used_connection — Returns an array which describes the last used connection ОписаниеReturns an array which describes the last used connection from the plugins connection pool currently pointed to by the user connection handle. If using the plugin, a user connection handle represents a pool of database connections. It is not possible to tell from the user connection handles properties to which database server from the pool the user connection handle points. The function can be used to debug or monitor PECL mysqlnd_ms. Список параметровВозвращаемые значенияFALSE on error. Otherwise, an array which describes the connection used to execute the last statement on. Array which describes the connection.
Примечания
ПримерыThe example assumes that myapp refers to a plugin configuration file section and represents a connection pool.
Пример #1 mysqlnd_ms_get_last_used_connection() example
<?php Результат выполнения данного примера: 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" } |
||||||||||||||||||||||||||||||||||