Documentation Home
MySQL PHP API
Download this Manual
PDF (US Ltr) - 2.8Mb
PDF (A4) - 2.8Mb
EPUB - 456.8Kb
HTML Download (TGZ) - 396.1Kb
HTML Download (Zip) - 409.9Kb


MySQL PHP API  /  ...  /  MysqlndUhConnection::queryReadResultsetHeader

9.7.31 MysqlndUhConnection::queryReadResultsetHeader

Copyright 1997-2014 the PHP Documentation Group.

  • 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 connection handle. Do not modify!

mysqlnd_stmt

Mysqlnd statement handle. Do not modify! Set to NULL, if function is not used in the context of a prepared statement.

Return Values

Returns TRUE on success. Otherwise, returns FALSE

Examples

Example 9.38 MysqlndUhConnection::queryReadResultsetHeader example


<?php
class proxy extends MysqlndUhConnection {
 public function queryReadResultsetHeader($res, $stmt) {
  printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
  $ret = parent::queryReadResultsetHeader($res, $stmt);
  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::queryReadResultsetHeader(array (
  0 => NULL,
  1 => NULL,
))
proxy::queryReadResultsetHeader returns true
array(1) {
  ["Welcome mysqlnd_uh!"]=>
  string(19) "Welcome mysqlnd_uh!"
}


See Also

mysqlnd_uh_set_connection_proxy


User Comments
Sign Up Login You must be logged in to post a comment.