Done both.
In fact, I create an object which has 2 database objects in it.
If I dump the objects, I can WATCH as they "merge" and point
at the same database.
I go back to using mysql_db_query() and everything's fine.
It would appear that the mysql_select_db() is not persisting.
If you call it on two different links, it's seems to modify both
links. Almost like it's global....
*shrug*
-Szii
----- Original Message -----
From: "Paul Burney" <[EMAIL PROTECTED]>
To: "Szii" <[EMAIL PROTECTED]>; "php mailing list" <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 2:28 PM
Subject: Re: [PHP-DB] MySQL Modules and multiple database
> on 8/13/01 1:56 PM, Szii ([EMAIL PROTECTED]) 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: <[EMAIL PROTECTED]> |
> | UCLA -> GSE&IS -> ETU | W: <http://www.gseis.ucla.edu/> |
> +-------------------------+---------------------------------+
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]