cordel Posted April 23, 2009 Share Posted April 23, 2009 Hello all, I'm looking at trying to drive my knowledge to the next level. I want my application to be able to interface with other databases besides just mysql and would like to be able to select the database to use from a config file for Mysql, Postgresql, Berkeley DB, etc. I am wondering if anyone has a suggestion for a project that implements the option of being able to select from several DB's in a clean fashion that I might be able to learn from that has a good structure and good use of code to get me off on the right track. I have seen several projects capable but just in case someone has sen something elegant for a good role model I thought I would ask. Thanks in advance, Cordel Link to comment https://forums.phpfreaks.com/topic/155422-interfacing-to-diff-databases-in-php/ Share on other sites More sharing options...
DarkSuperHero Posted April 23, 2009 Share Posted April 23, 2009 While reading one the books I purchased on php to illustrate a point on the Factory Patter, they decided to go about building a class to handle different database connections regardless of what database it was...how about looking into the Factory patter to do this...I have not had a try since I mostly just use MySQL.... Here's some reading on the subject... http://www.devshed.com/c/a/PHP/The-Basics-of-Using-the-Factory-Pattern-in-PHP-5/ Link to comment https://forums.phpfreaks.com/topic/155422-interfacing-to-diff-databases-in-php/#findComment-817937 Share on other sites More sharing options...
nankoweap Posted April 24, 2009 Share Posted April 24, 2009 i would think you'd be remiss to not consider using PEAR DB... http://www.learnphp-tutorial.com/PEAR-DB.cfm jason Link to comment https://forums.phpfreaks.com/topic/155422-interfacing-to-diff-databases-in-php/#findComment-817949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.