[ErrorSystem-devel] db layer
Status: Planning
Brought to you by:
sonicmctails
From: BrokenClock <bro...@fr...> - 2003-12-22 14:45:20
|
In fact, the constructor, I would have prefer something like this: Class DBL{ function DBL($user, $pass, $name, $server="localhost", $port=3306, $type="MySQL") { $this->user=$user; $this->pass=$pass; $this->name=$name; $this->server=$server; $this->port=$port; $this->type=$type; switch ($type) { case "MySQL": include("mysql.inc.php"); break; case "ProgresSQL": include("progress.inc.php"); break; //and so on } } } Should this work? What do you think about that? Stephane |