1--TEST-- 2mysqli_fetch_row() 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?php 7require_once('skipifconnectfailure.inc'); 8?> 9--FILE-- 10<?php 11 require_once("connect.inc"); 12 13 require('table.inc'); 14 if (!$res = mysqli_query($link, "SELECT id, label, id AS _id FROM test ORDER BY id LIMIT 1")) { 15 printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); 16 } 17 18 print "[004]\n"; 19 var_dump(mysqli_fetch_row($res)); 20 21 print "[005]\n"; 22 var_dump(mysqli_fetch_row($res)); 23 24 mysqli_free_result($res); 25 26 try { 27 mysqli_fetch_row($res); 28 } catch (Error $exception) { 29 echo $exception->getMessage() . "\n"; 30 } 31 32 mysqli_close($link); 33 print "done!"; 34?> 35--CLEAN-- 36<?php 37 require_once("clean_table.inc"); 38?> 39--EXPECT-- 40[004] 41array(3) { 42 [0]=> 43 string(1) "1" 44 [1]=> 45 string(1) "a" 46 [2]=> 47 string(1) "1" 48} 49[005] 50NULL 51mysqli_result object is already closed 52done! 53