[PHP-DOC] cvs: phpdoc /en/reference/pgsql/functions pg-get-result.xml

2005-07-03 Thread Christopher Kings-Lynne
chriskl Sun Jul  3 10:59:22 2005 EDT

  Modified files:  
/phpdoc/en/reference/pgsql/functionspg-get-result.xml 
  Log:
  New doc style for pg_get_result()
  
http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-get-result.xml?r1=1.4r2=1.5ty=u
Index: phpdoc/en/reference/pgsql/functions/pg-get-result.xml
diff -u phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.4 
phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.5
--- phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.4   Fri Mar 11 
11:03:25 2005
+++ phpdoc/en/reference/pgsql/functions/pg-get-result.xml   Sun Jul  3 
10:59:21 2005
@@ -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.58 --
 refentry id='function.pg-get-result'
  refnamediv
@@ -16,13 +16,88 @@
methodparam 
choice=opttyperesource/typeparameterconnection/parameter/methodparam
   /methodsynopsis
   para
-   functionpg_get_result/function get result resource from async
-   query executed by
-   functionpg_send_query/function. functionpg_send_query/function
-   can send multiple queries to PostgreSQL server and
-   functionpg_get_result/function is used to get query result
-   one by one. It returns result resource. If there is no more
-   results, it returns false;.
+   functionpg_get_result/function gets the result resource from
+   an asynchronous query executed by
+   functionpg_send_query/function, 
functionpg_send_query_params/function or
+   functionpg_send_execute/function.
+  /para
+  parafunctionpg_send_query/function and the
+   other asynchronous query functions
+   can send multiple queries to a PostgreSQL server and
+   functionpg_get_result/function is used to get each query's results,
+   one by one.
+  /para
+ /refsect1
+ 
+ refsect1 role=parameters
+  reftitle.parameters;
+  para
+   variablelist
+varlistentry
+ termparameterconnection/parameter/term
+ listitem
+  para
+   PostgreSQL database connection resource.
+  /para
+ /listitem
+/varlistentry
+   /variablelist
+  /para
+ /refsect1
+
+ refsect1 role=returnvalues
+  reftitle.returnvalues;
+  para
+   The result typeresource/type, or false; if no more results are 
available.
+  /para
+ /refsect1 
+
+ refsect1 role=examples
+  reftitle.examples;
+  para
+   example
+titlefunctionpg_get_result/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 authors; select count(*) from 
authors;);
+  }
+  
+  $res1 = pg_get_result($dbconn);
+  echo First call to pg_get_result(): $res1\n;
+  $rows1 = pg_num_rows($res1);
+  echo $res1 has $rows1 records\n\n;
+  
+  $res2 = pg_get_result($dbconn);
+  echo second call to pg_get_result(): $res2\n;
+  $rows2 = pg_num_rows($res2);
+  echo $res2 has $rows2 records\n;
+?
+]]
+/programlisting
+example.outputs;
+screen
+![CDATA[
+first call to pg_get_result(): Resource id #3
+Resource id #3 has 3 records
+
+second call to pg_get_result(): Resource id #4
+Resource id #4 has 1 records
+]]
+/screen
+   /example 
+  /para
+ /refsect1
+
+ refsect1 role=seealso
+  reftitle.seealso;
+  para
+   simplelist
+memberfunctionpg_send_query/function/member
+   /simplelist
   /para
  /refsect1
 /refentry


[PHP-DOC] cvs: phpdoc /en/reference/pgsql/functions pg-get-result.xml

2005-07-03 Thread Jean-S�bastien Goupil
jsgoupilMon Jul  4 00:50:59 2005 EDT

  Modified files:  
/phpdoc/en/reference/pgsql/functionspg-get-result.xml 
  Log:
  program and screen didn't fit
  
http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-get-result.xml?r1=1.5r2=1.6ty=u
Index: phpdoc/en/reference/pgsql/functions/pg-get-result.xml
diff -u phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.5 
phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.6
--- phpdoc/en/reference/pgsql/functions/pg-get-result.xml:1.5   Sun Jul  3 
10:59:21 2005
+++ phpdoc/en/reference/pgsql/functions/pg-get-result.xml   Mon Jul  4 
00:50:58 2005
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.5 $ --
+!-- $Revision: 1.6 $ --
 !-- splitted from ./en/functions/pgsql.xml, last change in rev 1.58 --
 refentry id='function.pg-get-result'
  refnamediv
@@ -72,7 +72,7 @@
   echo $res1 has $rows1 records\n\n;
   
   $res2 = pg_get_result($dbconn);
-  echo second call to pg_get_result(): $res2\n;
+  echo Second call to pg_get_result(): $res2\n;
   $rows2 = pg_num_rows($res2);
   echo $res2 has $rows2 records\n;
 ?
@@ -81,10 +81,10 @@
 example.outputs;
 screen
 ![CDATA[
-first call to pg_get_result(): Resource id #3
+First call to pg_get_result(): Resource id #3
 Resource id #3 has 3 records
 
-second call to pg_get_result(): Resource id #4
+Second call to pg_get_result(): Resource id #4
 Resource id #4 has 1 records
 ]]
 /screen