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 21:13 UTC
From: eln at gmx dot net Assigned: quipo
Status: Closed Package: DB_QueryTool
PHP Version: Irrelevant OS: Linux
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 : 22 - 13 = ?

 
 [2004-07-28 21: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 19: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 09: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.