View Single Post
Old 04-05-2008, 08:32 PM   #26 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

hi m8,

I can see where you are coming from but there are a few ways to solve this problem, one of them being having a central config with a define() maybe, like so:
config.php
PHP Code:
//config
define('DB_TYPE''mysql'); //or oracle 
then the call would be:
PHP Code:
$factory->connect(DB_TYPE); 
the other alternitive is to maybe use the registry pattern, but thats a article for another day.

hope this helps :)
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote