Re: Re: DB and mysql_select_db
| From: | Matt | Date: | Thu, 22 Jul 2004 17:12:41 +0000 |
| Subject: | Re: Re: DB and mysql_select_db | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32257@lists.php.net to get a copy of this message | ||
> Yes ... so imagine if you want to use multiple databases in a script.
> That's why.
Isn't that what the optional second parameter to mysql_query() is for?
Keeping track of the connection you intend to use?
connect() does choose the DB and simpleQuery() already does pass the
resource link to avoid confusion. You have to create a second instance
to use a different dsn anyway. That'll get its own resource link, so
always calling mysql_select_db does seem overboard.
But I might be wrong.
M