From 423a806315e921ba01a7c5feecbf39a45d179a84 Mon Sep 17 00:00:00 2001 From: James Moore Date: Sat, 19 Aug 2000 19:56:06 +0000 Subject: [PATCH] Corrected pg_fetch_row documentation git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30530 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pgsql.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/functions/pgsql.xml b/functions/pgsql.xml index c3b599bfc2..455dacd5ac 100644 --- a/functions/pgsql.xml +++ b/functions/pgsql.xml @@ -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. - - Subsequent call to pg_fetch_row would - return the next row in the result set, or false if there are no - more rows. - See also: pg_fetch_array, pg_fetch_object, @@ -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>"; + +} + ?>