From 5254c6f37284007efd17acedc2036a3b0f1d542e Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Wed, 9 Sep 2009 17:03:03 +0000 Subject: Next attempt to fix http://bugs.php.net/bug.php?id=48745. Patch by Andrey. --- ext/mysql/tests/mysql_fetch_field.phpt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ext/mysql/tests/mysql_fetch_field.phpt') diff --git a/ext/mysql/tests/mysql_fetch_field.phpt b/ext/mysql/tests/mysql_fetch_field.phpt index f9767c82b7..65c44edc5e 100644 --- a/ext/mysql/tests/mysql_fetch_field.phpt +++ b/ext/mysql/tests/mysql_fetch_field.phpt @@ -124,9 +124,16 @@ require_once('skipifconnectfailure.inc'); printf("[017] [%d] %s\n", mysql_errno($link), mysql_error($link)); } $res = mysql_list_fields($db, 'test'); - while ($tmp = mysql_fetch_field($res)) - if ($tmp->name == 'id') + $found = false; + while ($tmp = mysql_fetch_field($res)) { + if ($tmp->name == 'id') { + printf("Fetch field from mysql_list_fields result set.\n"); + $found = true; var_dump($tmp); + } + } + if (!$found) + printf("[018] mysqli_list_fields result set processing has failed.\n"); mysql_free_result($res); @@ -227,6 +234,7 @@ object(stdClass)#%d (13) { [%u|b%"zerofill"]=> int(0) } +Fetch field from mysql_list_fields result set. object(stdClass)#%d (13) { [%u|b%"name"]=> %unicode|string%(2) "id" -- cgit v1.2.1