Oracle 5.0 Reference Manual page 2750

Table of Contents

Advertisement

class proxy extends MysqlndUhConnection {
public function escapeString($res, $string) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::escapeString($res, $string);
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->set_charset("latin1");
$mysqli->real_escape_string("test0'test");
?>
The above example will output:
proxy::escapeString(array (
0 => NULL,
1 => 'test0\'test',
))
proxy::escapeString returns 'test0\\\'test'
See Also
mysqlnd_uh_set_connection_proxy
mysqli_real_escape_string
mysql_real_escape_string
20.7.8.7.8.
MysqlndUhConnection::getAffectedRows
Copyright 1997-2012 the PHP Documentation Group. [2230]
MysqlndUhConnection::getAffectedRows
Gets the number of affected rows in a previous MySQL operation
Description
public int MysqlndUhConnection::getAffectedRows(
mysqlnd_connection connection);
Gets the number of affected rows in a previous MySQL operation.
Parameters
connection
Return Values
Number of affected rows.
Examples
Example 20.343.
<?php
class proxy extends MysqlndUhConnection {
public function getAffectedRows($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::getAffectedRows($res);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
Mysqlnd user handler plugin (mysqlnd_uh)
Mysqlnd connection handle. Do not modify!
MysqlndUhConnection::getAffectedRows
2730
example

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents