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

Request #10787 visibility of MDB2_Driver_Common::phptype
Submitted: 2007-04-20 11:44 UTC
From: cwiedmann Assigned: quipo
Status: Closed Package: MDB2 (version 2.4.0)
PHP Version: 5.2.1 OS: Windows_NT
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 : 11 - 4 = ?

 
 [2007-04-20 11:44 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ Is there a opportunity to change the visibility of the member MDB2_Driver_Common::phptype from protected to public? (Or add a method to retrieve this value.) Currently I use something like testscript1, but I think testscript2 is enough. Test script: --------------- *** [testscript1] *** $mdb2 = MDB2::connect($dsn); $phptype = $mdb2->getDSN('array'); $phptype = $phptype['phptype']; if ('mysql' === $phptype) { // build query with mysql specific functions } elseif ('mssql' === $phptype) { // build query with mssql specific functions } else { // build query for other dbs } *** [testscript2] *** $mdb2 = MDB2::connect($dsn); if ('mysql' === $mdb2->phptype) { // build query with mysql specific function } elseif ('mssql' === $mdb2->phptype) { // build query with mssql specific function } else { // build query for other dbs }

Comments

 [2007-04-25 09:31 UTC] quipo (Lorenzo Alberton)
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.