Oracle 5.0 Reference Manual page 2780

Table of Contents

Advertisement

Examples
Example 20.365.
<?php
class proxy extends MysqlndUhConnection {
public function query($res, $query) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$query = "SELECT 'How about query rewriting?'";
$ret = parent::query($res, $query);
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");
$res = $mysqli->query("SELECT 'Welcome mysqlnd_uh!' FROM DUAL");
var_dump($res->fetch_assoc());
?>
The above example will output:
proxy::query(array (
0 => NULL,
1 => 'SELECT \'Welcome mysqlnd_uh!\' FROM DUAL',
))
proxy::query returns true
array(1) {
["How about query rewriting?"]=>
string(26) "How about query rewriting?"
}
See Also
mysqlnd_uh_set_connection_proxy
mysqli_query
mysql_query
20.7.8.7.31.
MysqlndUhConnection::queryReadResultsetHeader
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhConnection::queryReadResultsetHeader
Read a result set header
Description
public bool MysqlndUhConnection::queryReadResultsetHeader(
mysqlnd_connection connection,
mysqlnd_statement mysqlnd_stmt);
Read a result set header.
Parameters
connection
mysqlnd_stmt
Mysqlnd user handler plugin (mysqlnd_uh)
MysqlndUhConnection::query
Mysqlnd connection handle. Do not modify!
Mysqlnd statement handle. Do not modify! Set to
is not used in the context of a prepared statement.
example
2760
, if function
NULL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents