mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
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:
parent
c9c80ec457
commit
423a806315
1 changed files with 11 additions and 11 deletions
|
@ -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] . " <- row\n";
|
||||
$num = pg_numrows($result);
|
||||
|
||||
$row = pg_fetch_row ($result, 1);
|
||||
echo $row[0] . " <- row\n";
|
||||
for ($i=0; $i<$num; $i++) {
|
||||
$r = pg_fetch_row($result, $i);
|
||||
|
||||
$row = pg_fetch_row ($result, 2);
|
||||
echo $row[1] . " <- row\n";
|
||||
for ($j=0; $j<count($r); $j++) {
|
||||
echo "$r[$j]&nbsp;";
|
||||
}
|
||||
|
||||
echo "<BR>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue