Re: DB connections with more databases

From: Date: Mon, 15 Nov 2004 18:59:31 +0000
Subject: Re: DB connections with more databases
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15532@lists.php.net to get a copy of this message
On Mon, 15 Nov 2004 13:28:36 +0100, Sönke Ruempler <ruempler@topconcepts.com> wrote: > Hi, > > i noticed that i can't change the database within a pear object, because DB > sets the db before each query. Now i have a mysql server with 4 databases > and i need to use them all. I could make 4 DB database connections, but that > is really ugly and much overhead. Any solution? > The best solution is to prefix your table names with the db name: SELECT * FROM database.table -- Justin Patrin

« previous php.pear.general (#15532) next »