Corrected pg_fetch_row documentation

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30530 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
James Moore 2000-08-19 19:56:06 +00:00
parent c9c80ec457
commit 423a806315

View file

@ -466,11 +466,6 @@ pg_close ($db_conn);
row is returned as an array. Each result column is stored in an
array offset, starting at offset 0.
</para>
<para>
Subsequent call to <function>pg_fetch_row</function> would
return the next row in the result set, or false if there are no
more rows.
</para>
<para>
See also: <function>pg_fetch_array</function>,
<function>pg_fetch_object</function>,
@ -491,14 +486,19 @@ if (!$result) {
exit;
}
$row = pg_fetch_row ($result, 0);
echo $row[0] . " &lt;- row\n";
$num = pg_numrows($result);
$row = pg_fetch_row ($result, 1);
echo $row[0] . " &lt;- row\n";
for ($i=0; $i&lt;$num; $i++) {
$r = pg_fetch_row($result, $i);
$row = pg_fetch_row ($result, 2);
echo $row[1] . " &lt;- row\n";
for ($j=0; $j&lt;count($r); $j++) {
echo "$r[$j]&amp;nbsp;";
}
echo "&lt;BR>";
}
?>
</programlisting>
</example>