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