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] ";
+ }
+
+ echo "<BR>";
+
+}
+
?>