11-26-2007, 08:20 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 127
Thanks: 14
|
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
|
|
|
|