Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17832 программиста и 1566 роботов. Сейчас ищут 1043 программиста ...
MysqlndUhConnection::storeResult - Transfers a result set from the last query
Вернуться к: MysqlndUhConnection
MysqlndUhConnection::storeResult
(PECL mysqlnd-uh >= 1.0.0-alpha)
MysqlndUhConnection::storeResult — Transfers a result set from the last query
Описание
public resource MysqlndUhConnection::storeResult
( mysqlnd_connection
$connection
)Transfers a result set from the last query.
Список параметров
-
connection
-
Mysqlnd connection handle. Do not modify!
Возвращаемые значения
Resource of type Mysqlnd Resultset (internal only - you must not modify it!). The documentation may also refer to such resources using the alias name mysqlnd_resultset.
Примеры
Пример #1 MysqlndUhConnection::storeResult() example
<?php
class proxy extends MysqlndUhConnection {
public function storeResult($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::storeResult($res);
printf("%s returns %s\n", __METHOD__, var_export($ret, true));
var_dump($ret);
return $ret;
}
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost", "root", "", "test");
$res = $mysqli->query("SELECT 'Also called buffered result' AS _msg FROM DUAL");
var_dump($res->fetch_assoc());
$mysqli->real_query("SELECT 'Good morning!' AS _msg FROM DUAL");
$res = $mysqli->store_result();
var_dump($res->fetch_assoc());
?>
Результат выполнения данного примера:
proxy::storeResult(array ( 0 => NULL, )) proxy::storeResult returns NULL resource(475) of type (Mysqlnd Resultset (internal only - you must not modify it!)) array(1) { ["_msg"]=> string(27) "Also called buffered result" } proxy::storeResult(array ( 0 => NULL, )) proxy::storeResult returns NULL resource(730) of type (Mysqlnd Resultset (internal only - you must not modify it!)) array(1) { ["_msg"]=> string(13) "Good morning!" }
Смотрите также
- mysqlnd_uh_set_connection_proxy() - Installs a proxy for mysqlnd connections
- mysqli_store_result() - Передает результирующий набор последнего запроса
- mysqli_real_query() - Выполнение SQL запроса
Вернуться к: MysqlndUhConnection