svn: /pear/peardoc/trunk/en/package/database/mdb2/ intro-fetch.xml

[email protected] (Lorenzo Alberton) Sat, 26 Dec 2009 13:40:37 +0000
Newsgroups php.pear.doc
Message-ID <[email protected]>
quipo                                    Sat, 26 Dec 2009 13:40:37 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292639

Log:
added another nextResult() example [bug #14060]

Bug: http://pear.php.net/bugs/14060 (unknown) 
      
Changed paths:
    U   pear/peardoc/trunk/en/package/database/mdb2/intro-fetch.xml

Modified: pear/peardoc/trunk/en/package/database/mdb2/intro-fetch.xml
===================================================================
--- pear/peardoc/trunk/en/package/database/mdb2/intro-fetch.xml	2009-12-26 11:01:56 UTC (rev 292638)
+++ pear/peardoc/trunk/en/package/database/mdb2/intro-fetch.xml	2009-12-26 13:40:37 UTC (rev 292639)
@@ -423,6 +423,26 @@
    </example>

    <example><info><title>
+     <phrase xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Result_Common.html#methodnextResult">
+      Another <function>nextResult</function></phrase> example with a Stored Procedure returning multiple result sets.
+    </title></info>
+
+    <programlisting role="php">
+     <![CDATA[
+<?php
+$rs = $db->executeStoredProcedure('procedureName', array('argument1'));
+do {
+    while ($row = $result->fetchRow(MDB2_FETCHMODE_OBJECT)) {
+        var_dump($row);
+    }
+} while ($result->nextResult());
+$result->free();
+?>
+     ]]>
+    </programlisting>
+   </example>
+
+   <example><info><title>
      <phrase xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Result_Common.html#methodbindColumn">
       <function>bindColumn</function></phrase> allows to bind a reference to
       a user variable to a specific field inside the result set. This means that