[PHP-DB] Re: Re:[2] [PHP-DB] database absraction layer

2002-05-06 Thread Andrey Hristov

You can use PEAR nevertheless they don't have it in the config. PEAR is
userspace, so you can get it from everywhere put it everywhere in you home
dir or in subdirs, and just refer to it with require and include. But be
aware that there can be relative include/require in the PEAR that have to be
satisfied
It's like getting a script from hotscripts.com or a class from
phpclasses.org and using it.

Andrey

- Original Message -
From: "adi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 5:02 AM
Subject: Re:[2] [PHP-DB] database absraction layer


> thanks,
> but what I want is, they don't have to --enable-dbx or enable pear in
their php
> configuration to be able to use this class.
>
>
> "Andrey Hristov" <[EMAIL PROTECTED]> wrote on 5/7/02 9:29:24 AM:
> >
> >Look at PEAR repository for userspace abstraction layer.
> >Look at the dbx extension for compiled abstraction layer.
> >
> >Andrey
> >
> >- Original Message -
> >From: "adi" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, May 07, 2002 4:08 AM
> >Subject: [PHP-DB] database absraction layer
> >
> >
> >> 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 = mysql_connect($this->host,$this->user,$this->pass);
> >> }
> >> elseif($this->type == "pgsql")){
> >> $this->conid = pg_connect($this->host $this->port $this->db $this->user
> >> $this->pass); }
> >> else {
> >> echo ("database type $this->type not supported");
> >> }
> >> }
> >> ..
> >>
> >> any idea of doing such of function alias/wrapper?
> >> any help appreciated
> >> thanks
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] database absraction layer

2002-05-06 Thread Andrey Hristov

Look at PEAR repository for userspace abstraction layer.
Look at the dbx extension for compiled abstraction layer.

Andrey

- Original Message -
From: "adi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 4:08 AM
Subject: [PHP-DB] database absraction layer


> 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 = mysql_connect($this->host,$this->user,$this->pass);
> }
> elseif($this->type == "pgsql")){
> $this->conid = pg_connect($this->host $this->port $this->db $this->user
> $this->pass); }
> else {
> echo ("database type $this->type not supported");
> }
> }
> ..
>
> any idea of doing such of function alias/wrapper?
> any help appreciated
> thanks
>
> ___
> adi.aroundbali.com
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] database absraction layer

2002-05-06 Thread adi

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 = 
mysql_connect($this->host,$this->user,$this->pass);
}
elseif($this->type == "pgsql")){
$this->conid = pg_connect($this->host $this->port $this->db 
$this->user 
$this->pass);   }
else { 
echo ("database type $this->type not supported");
}
}
..

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

___
adi.aroundbali.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php