From f78ca5039b0e146dfd7161fc49a52c7523f3d1dd Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Mon, 1 Sep 2003 16:58:05 +0000 Subject: [PATCH] Nuke bogus ibase_num_fields() example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@139387 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../ibase/functions/ibase-num-fields.xml | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/reference/ibase/functions/ibase-num-fields.xml b/reference/ibase/functions/ibase-num-fields.xml index 7b76194dda..1f7570da2d 100644 --- a/reference/ibase/functions/ibase-num-fields.xml +++ b/reference/ibase/functions/ibase-num-fields.xml @@ -1,5 +1,5 @@ - + @@ -21,19 +21,16 @@ 0) { - while ($row = ibase_fetch_object ($sth)) { - print $row->email . "\n"; - } - } else { - die ("No Results were found for your query"); + $rs = ibase_query("SELECT * FROM tablename"); + $coln = ibase_num_fields($rs); + for ($i = 0; $i < $coln; $i++) { + $col_info = ibase_field_info($rs, $i); + echo "name: ".$col_info['name']."\n"; + echo "alias: ".$col_info['alias']."\n"; + echo "relation: ".$col_info['relation']."\n"; + echo "length: ".$col_info['length']."\n"; + echo "type: ".$col_info['type']."\n"; } - - ibase_close ($dbh); ?> ]]>