1--TEST-- 2mysql_fetch_row() 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7?> 8--FILE-- 9<?php 10include "connect.inc"; 11 12$tmp = NULL; 13$link = NULL; 14 15if (!is_null($tmp = @mysql_fetch_row())) 16 printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 17 18if (NULL !== ($tmp = @mysql_fetch_row($link))) 19 printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 20 21require('table.inc'); 22if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) { 23 printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link)); 24} 25 26print "[004]\n"; 27var_dump(mysql_fetch_row($res)); 28 29print "[005]\n"; 30var_dump(mysql_fetch_row($res)); 31 32mysql_free_result($res); 33 34var_dump(mysql_fetch_row($res)); 35 36mysql_close($link); 37print "done!"; 38?> 39--CLEAN-- 40<?php 41require_once("clean_table.inc"); 42?> 43--EXPECTF-- 44Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d 45[004] 46array(2) { 47 [0]=> 48 %unicode|string%(1) "1" 49 [1]=> 50 %unicode|string%(1) "a" 51} 52[005] 53bool(false) 54 55Warning: mysql_fetch_row(): %d is not a valid MySQL result resource in %s on line %d 56bool(false) 57done! 58