diff options
| author | Ulf Wendel <uw@php.net> | 2009-09-09 17:03:03 +0000 |
|---|---|---|
| committer | Ulf Wendel <uw@php.net> | 2009-09-09 17:03:03 +0000 |
| commit | 5254c6f37284007efd17acedc2036a3b0f1d542e (patch) | |
| tree | 7141da211c789c02893dc245e24412ac30c4b1f6 /ext/mysql/tests/mysql_fetch_field.phpt | |
| parent | 5b709c4718e2138171d8c6d9f7ca18ee4f3efb78 (diff) | |
| download | php-git-5254c6f37284007efd17acedc2036a3b0f1d542e.tar.gz | |
Next attempt to fix http://bugs.php.net/bug.php?id=48745. Patch by Andrey.
Diffstat (limited to 'ext/mysql/tests/mysql_fetch_field.phpt')
| -rw-r--r-- | ext/mysql/tests/mysql_fetch_field.phpt | 12 |
1 files changed, 10 insertions, 2 deletions
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" |
