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

Bug #8068 getAssoc() with $params dont work on ibase
Submitted: 2006-06-29 11:09 UTC
From: nilya Assigned: lsmith
Status: Closed Package: MDB2 (version 2.1.0)
PHP Version: 5.1.4 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 27 + 8 = ?

 
 [2006-06-29 11:09 UTC] nilya (Ilya)
Description: ------------ Method getAssoc (from module "Extended") with $params on queries to Interbase/Firebird always return empty result. But method call without $params works as expected. Test script: --------------- function test($mdb2_link) { $mdb2_link->loadModule('Extended'); $r = $mdb2_link->getAssoc('SELECT id, name FROM test_table WHERE type=?', array('integer','text'), array(2), array('integer')); var_dump($r); } //Test A: query ibase $mdb2_i =& MDB2::connect('ibase://....'); test($mdb2_i); //Test B: query mysql $mdb2_m =& MDB2::connect('mysqli://....'); test($mdb2_m); Expected result: ---------------- Test A and test B: Array with results Actual result: -------------- Test A: array(0){ } Test B: Array with results

Comments

 [2006-06-29 11:30 UTC] nilya
How to fix bug (see diff): =================================================================== --- /PEAR/MDB2/Extended.php +++ /PEAR/MDB2/Extended.php @@ -519,9 +519,9 @@ if (!MDB2::isResultCommon($result)) { return $result; } - $stmt->free(); $all = $result->fetchAll($fetchmode, true, $force_array, $group); + $stmt->free(); $result->free(); return $all; }
 [2006-06-29 12:10 UTC] lsmith (Lukas Smith)
This bug has been fixed in CVS. 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.
 [2006-06-29 14:04 UTC] nilya
Lukas, thank for you fixes. But one thing: you fix this bug in all extended.php functions, but not in getAssoc().