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

Bug #2007 Doesn't support using an existing DB object, but the docs says it should
Submitted: 2004-07-28 16:13 UTC Modified: 2004-07-31 04:44 UTC
From: eln at gmx dot net Assigned: quipo
Status: Closed Package: DB_QueryTool
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-28 16:13 UTC] eln at gmx dot net
Description: ------------ Using an existing DB object with DB_QueryTool (instead of passing it a DSN) is not possible, even though the inline documentation says it will. It's a very simple thing to fix, and I've uploaded a patch (against CVS) here: http://ununique.net/div/Query.php.diff Works for me, anyway! Reproduce code: --------------- $db = DB::connect("mysql://user:pass@localhost/db"); $querytool = new DB_QueryTool($db);

Comments

 [2004-07-29 14:06 UTC] quipo
This should work: ================================ $db =& DB::connect(DB_DSN); $qt =& new DB_QueryTool(); $qt->setDbInstance($db); ================================ Anyway, your patch goes in a more intuitive direction, so I'll probably apply it in the next few days. Many thanks.
 [2004-07-31 04:44 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.