1--TEST--
2mysqli_store_result()
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--INI--
10mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace"
11--FILE--
12<?php
13    require_once("connect.inc");
14
15    $tmp    = NULL;
16    $link   = NULL;
17
18
19    require('table.inc');
20
21    if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
22        printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
23
24    if (!is_object($res = mysqli_store_result($link, MYSQLI_STORE_RESULT_COPY_DATA)))
25        printf("[004] Expecting object, got %s/%s. [%d] %s\n",
26            gettype($res), $res, mysqli_errno($link), mysqli_error($link));
27
28    if (true !== ($tmp = mysqli_data_seek($res, 2)))
29        printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
30            gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
31
32    mysqli_free_result($res);
33
34    print "done!";
35?>
36--CLEAN--
37<?php
38    require_once("clean_table.inc");
39?>
40--EXPECT--
41done!
42