chriskl Tue Nov 29 23:06:57 2005 EDT
Modified files:
/phpdoc/en/reference/pgsql/functions pg-result-error.xml
Log:
Re-add pg_result_error() example function.
http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-result-error.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/reference/pgsql/functions/pg-result-error.xml
diff -u phpdoc/en/reference/pgsql/functions/pg-result-error.xml:1.8
phpdoc/en/reference/pgsql/functions/pg-result-error.xml:1.9
--- phpdoc/en/reference/pgsql/functions/pg-result-error.xml:1.8 Tue Nov 29
14:25:10 2005
+++ phpdoc/en/reference/pgsql/functions/pg-result-error.xml Tue Nov 29
23:06:54 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 -->
<refentry id='function.pg-result-error'>
<refnamediv>
@@ -57,6 +57,29 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>pg_result_error</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ $dbconn = pg_connect("dbname=publisher") or die("Could not connect");
+
+ if (!pg_connection_busy($dbconn)) {
+ pg_send_query($dbconn, "select * from doesnotexist;");
+ }
+
+ $res1 = pg_get_result($dbconn);
+ echo pg_result_error($res1);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>