Jump to content

Interfacing to diff databases in php.


cordel

Recommended Posts

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

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/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.