Nuke bogus ibase_num_fields() example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@139387 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ard Biesheuvel 2003-09-01 16:58:05 +00:00
parent 0f9bfa3b2f
commit f78ca5039b

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/ibase.xml, last change in rev 1.12 -->
<refentry id="function.ibase-num-fields">
<refnamediv>
@ -21,19 +21,16 @@
<programlisting role="php">
<![CDATA[
<?php
$dbh = ibase_connect ($host, $username, $password);
$stmt = 'SELECT * FROM tblname';
$sth = ibase_query ($dbh, $stmt);
if (ibase_num_fields($sth) > 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);
?>
]]>
</programlisting>