MysqlndUhConnection::txRollback
MysqlndUhPreparedStatement
MysqlndUhConnection
PHP Manual

# MysqlndUhConnection::useResult

(PECL mysqlnd-uh >= 1.0.0-alpha)

MysqlndUhConnection::useResult — Initiate a result set retrieval

### Descrição

public resource MysqlndUhConnection::useResult ( mysqlnd_connection `$connection` )

Initiate a result set retrieval.

### Parâmetros

`connection`

  Mysqlnd connection handle. Do not modify!

### Valor Retornado

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.

### Exemplos

Exemplo #1 MysqlndUhConnection::useResult() example

`<?php
class proxy extends MysqlndUhConnection {
public function useResult($res) {
printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
$ret = parent::useResult($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");
$mysqli->real_query("SELECT 'Good morning!' AS _msg FROM DUAL");
$res = $mysqli->use_result();
var_dump($res->fetch_assoc());
?>`

O exemplo acima irá imprimir:

    proxy::useResult(array (
      0 => NULL,
    ))
    proxy::useResult returns NULL
    resource(425) of type (Mysqlnd Resultset (internal only - you must not modify it!))
    array(1) {
      ["_msg"]=>
      string(13) "Good morning!"
    }

### Veja Também

- mysqlnd_uh_set_connection_proxy() - Installs a proxy for mysqlnd connections
- mysqli_use_result() - Initiate a result set retrieval
- mysqli_real_query() - Execute an SQL query

MysqlndUhConnection::txRollback
MysqlndUhPreparedStatement
MysqlndUhConnection
PHP Manual