View Single Post
Old 11-26-2007, 08:20 PM   #1 (permalink)
bdm
The Acquainted
Good Samaritan 
 
Join Date: Nov 2007
Posts: 127
Thanks: 14
bdm is on a distinguished road
Default Most efficient way of storing database configurations?

So i have 3-4 databases which I need to access within the same application. I know I should be storing the database configurations in a config.php file (which I have). The way I'll be accessing these is when I create a new database object, I'd like to specify which credentials to use.

So essentially, I'd like to be able to do something along these lines:
PHP Code:
$serverName DatabaseFactory::factory('mysql'$databaseName); 
Or if someone knows of a better way, let me know.

Thank you. :)

Last edited by bdm : 11-26-2007 at 08:24 PM. Reason: <3
bdm is offline  
Reply With Quote