Re: MySQL Modules and multiple database

From: Date: Mon, 13 Aug 2001 21:28:18 +0000
Subject: Re: MySQL Modules and multiple database
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11312@lists.php.net to get a copy of this message
on 8/13/01 1:56 PM, Szii (szii@sziisoft.com) wrote: > Opening multiple databases on the same database machine > seems unsupported. While you CAN do it, it has a tendency > to "reuse" the last connection even in lieu of a specific database. > Right now we're using mysql_db_query() to get around it, but > with that becoming deprecated, we need to find anothe solution. Before each query (from a different database), you can call the function; mysql_select_db($database_name, $connection_id) You can also specify the connection id for your queries: mysql_query($query, $connection_id) Just make sure that you select the db before each query otherwise a query will use the last selected database. Sincerely, Paul Burney +-------------------------+---------------------------------+ | Paul Burney | P: 310.825.8365 | | Webmaster && Programmer | E: <webmaster@gseis.ucla.edu> | | UCLA -> GSE&IS -> ETU | W: <http://www.gseis.ucla.edu/> | +-------------------------+---------------------------------+

« previous php.db (#11312) next »