svn: /phpdoc/en/trunk/reference/pgsql/functions/ pg-fetch-all.xml
| From: | Jakub Vrana | Date: | Mon, 16 Nov 2009 12:21:22 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/pgsql/functions/ pg-fetch-all.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5399@lists.php.net to get a copy of this message | ||
vrana Mon, 16 Nov 2009 12:21:22 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290813
Log:
Example output (bug #49157)
Bug: http://bugs.php.net/49157 (Closed) suggestion to
improve pg_fetch_all documentation
Changed paths:
U phpdoc/en/trunk/reference/pgsql/functions/pg-fetch-all.xml
Modified: phpdoc/en/trunk/reference/pgsql/functions/pg-fetch-all.xml
===================================================================
--- phpdoc/en/trunk/reference/pgsql/functions/pg-fetch-all.xml 2009-11-16 12:19:53 UTC (rev 290812)
+++ phpdoc/en/trunk/reference/pgsql/functions/pg-fetch-all.xml 2009-11-16 12:21:22 UTC (rev 290813)
@@ -60,23 +60,43 @@
<?php
$conn = pg_pconnect("dbname=publisher");
if (!$conn) {
- echo "An error occured.\n";
- exit;
+ echo "An error occured.\n";
+ exit;
}
$result = pg_query($conn, "SELECT * FROM authors");
if (!$result) {
- echo "An error occured.\n";
- exit;
+ echo "An error occured.\n";
+ exit;
}
$arr = pg_fetch_all($result);
-var_dump($arr);
+print_r($arr);
?>
]]>
</programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Array
+(
+ [0] => Array
+ (
+ [id] => 1
+ [name] => Fred
+ )
+
+ [1] => Array
+ (
+ [id] => 2
+ [name] => Bob
+ )
+
+)
+]]>
+ </screen>
</example>
</para>
</refsect1>