Oracle 5.0 Reference Manual page 2753

Table of Contents

Advertisement

MysqlndUhConnection::getErrorString
space API call which maps directly to it but also called internally.
Example 20.345.
<?php
class proxy extends MysqlndUhConnection {
public function getErrorString($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::getErrorString($res);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
return $ret;
}
}
mysqlnd_uh_set_connection_proxy(new proxy());
printf("connect...\n");
$mysqli = new mysqli("localhost", "root", "", "test");
printf("query...\n");
$mysqli->query("WILL_I_EVER_LEARN_SQL?");
printf("errno...\n");
var_dump($mysqli->error);
printf("close...\n");
$mysqli->close();
?>
The above example will output:
connect...
proxy::getErrorString(array (
0 => NULL,
))
proxy::getErrorString returns ''
query...
errno...
proxy::getErrorString(array (
0 => NULL,
))
proxy::getErrorString returns 'You have an error in your SQL syntax; check the manual that corresponds
string(168) "You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv
close...
See Also
mysqlnd_uh_set_connection_proxy
MysqlndUhConnection::getErrorNumber
mysqli_error
mysql_error
20.7.8.7.11.
MysqlndUhConnection::getFieldCount
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhConnection::getFieldCount
Returns the number of columns for the most recent query
Description
public int MysqlndUhConnection::getFieldCount(
mysqlnd_connection connection);
Returns the number of columns for the most recent query.
Mysqlnd user handler plugin (mysqlnd_uh)
MysqlndUhConnection::getErrorString
is not only executed after the invocation of a user
example
2733

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents