Re: Php lib

From: Date: Sat, 04 Nov 2000 08:49:43 +0000
Subject: Re: Php lib
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-23686@lists.php.net to get a copy of this message
Yes, it is possible and works fine. You should rename base DB classes in respective include files, since all the classes are named DB_Sql. Change 'class DB_Sql' to 'class DB_Mysql' and 'class DB_Pgsql' in db_mysql.inc and db_pgsql.inc respectively, and then write your own extensions in the local.inc e.g. 'class My_DB_Mysql extends DB_Mysql { ....' and so on. Then you can use both dbs : <?php $my_db = new My_DB_Mysql; $pg_db = new My_Db_Pgsql; $query = select * from table; $my_db->query($query); $pg_db->query($query); ..... ?> You'll get results from different dbs in respective db classes. RИmy Dufour wrote: > Hi all, > > Is that possible to use multiple databases at the same time(Mysql And > Postgresql) with Php lib? > > Thank, > RИmy Dufour > IT Programmer > Webnet Inc. > -- Best regards, Max A. Derkachev mailto:kot@books.ru Symbol-Plus Publishing Ltd. phone: +7 (812) 265-0054, 265-1228, phone/fax: 567-8775 http://www.Books.Ru -- All Books of Russia

« previous php.general (#23686) next »