Oracle 5.0 Reference Manual page 2785

Table of Contents

Advertisement

mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost", "root", "", "test");
$mysqli->ping();
?>
The above example will output:
proxy::restartPSession(array (
0 => NULL,
))
proxy::restartPSession returns true
See Also
mysqlnd_uh_set_connection_proxy
20.7.8.7.35.
MysqlndUhConnection::selectDb
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhConnection::selectDb
Selects the default database for database queries
Description
public bool MysqlndUhConnection::selectDb(
mysqlnd_connection connection,
string database);
Selects the default database for database queries.
Parameters
connection
database
Return Values
Returns
TRUE
Examples
Example 20.370.
<?php
class proxy extends MysqlndUhConnection {
public function selectDb($res, $database) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::selectDb($res, $database);
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");
$mysqli->select_db("mysql");
?>
Mysqlnd user handler plugin (mysqlnd_uh)
Mysqlnd connection handle. Do not modify!
The database name.
on success. Otherwise, returns
MysqlndUhConnection::selectDb
FALSE
example
2765

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents