dear all,

I'm writing  database abstraction layer class (like adoDB but much simpler). 
What I want to do that it will provide single access function for different 
type of database. Currently, it will only support mySQL and PostgreSQL.. but I 
just don't know how to do this with better approach. 

code snippet..

function connect(){
                if($this->type == "mysql"){
                        $this->conid = 
                elseif($this->type == "pgsql")){
                        $this->conid = pg_connect($this->host $this->port $this->db 
$this->pass);           }
                else { 
                        echo ("database type $this->type not supported");

any idea of doing such of function alias/wrapper?
any help appreciated


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to