cvs: phpdoc /en/reference/pgsql/functions pg-fetch-row.xml

From: Date: Mon, 13 Jan 2003 03:17:20 +0000
Subject: cvs: phpdoc /en/reference/pgsql/functions pg-fetch-row.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350880@lists.php.net to get a copy of this message
jsheets Sun Jan 12 22:17:20 2003 EDT Modified files: /phpdoc/en/reference/pgsql/functions pg-fetch-row.xml Log: updated example to use while Index: phpdoc/en/reference/pgsql/functions/pg-fetch-row.xml diff -u phpdoc/en/reference/pgsql/functions/pg-fetch-row.xml:1.4 phpdoc/en/reference/pgsql/functions/pg-fetch-row.xml:1.5 --- phpdoc/en/reference/pgsql/functions/pg-fetch-row.xml:1.4 Wed Apr 24 21:07:17 2002 +++ phpdoc/en/reference/pgsql/functions/pg-fetch-row.xml Sun Jan 12 22:17:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-row"> <refnamediv> @@ -48,13 +48,9 @@ exit; } -$num = pg_num_rows($result); - -for ($i=0; $i < $num; $i++) { - $r = pg_fetch_row($result, $i); - - for ($j=0; $j < count($r); $j++) { - echo "$r[$j]&nbsp;"; +while ($row = pg_fetch_row($result, $i)) { + for ($j=0; $j < count($row); $j++) { + echo "$row[$j]&nbsp;"; } echo "<BR>";

« previous php.doc (#969350880) next »