Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Doc Bug #14060 Documentation example for looping rows from executeStoredProc
Submitted: 2008-06-03 17:27 UTC
From: gauthierm Assigned: quipo
Status: Closed Package: MDB2 (version 2.5.0b1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-06-03 17:27 UTC] gauthierm (Michael Gauthier)
Description: ------------ I had some trouble today looping the results of MDB2::executeStoredProc() using MySQLi. I eventually got it to work using the pattern in the test script section. This example may be useful to add to the result documentation at http://pear.php.net/manual/en/package.database.mdb2.intro-fetch.php. If you use the normal looping pattern, which is just the internal while loop, the result set will not be properly freed for MySQLi procedures. This causes out-of-sync errors when you call more than one procedure. This behavior may be a bug, in which case the test script is merely a workaround. Test script: --------------- $rs = $db->executeStoredProcedure('procedureName', array('argument1')); do { while ($row = $rs->fetchRow(MDB2_FETCHMODE_OBJECT)) { var_dump($row); } } while ($rs->nextResult());

Comments

 [2009-12-26 18:40 UTC] quipo (Lorenzo Alberton)
-Status: Open +Status: Closed -Assigned To: +Assigned To: quipo
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.