RE: [PHP-DEV] Bug #729: mysql_connect reuses connection ids
| From: | Shane Caraveo | Date: | Wed, 09 Sep 1998 23:48:20 +0000 |
| Subject: | RE: [PHP-DEV] Bug #729: mysql_connect reuses connection ids | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-894@lists.php.net to get a copy of this message | ||
>
> I'm not sure "easy" is the word I'd use. If it's just a
> matter of not
> closing connections, sure. But my 'black-box' function uses a
> different database than the rest of the page. Both
> mysql_select_db() and mysql_db_query() change the database
> that the connection is using, causing all subsequent queries to fail.
> I was really quite astonished that a function with only locally-
> scoped variables could have global side-effects! The only work-
> around I'm aware of is to have any script that calls that
> function use
> mysql_select_db() afterwards. So much for the black box..
>
Ohh, I thought you were wanting two connections to the same database. If
we're connecting to different databases, we should not be overwriting
connections. That is kind of realy bad. I dont think we should worry about
any switch for this, we should make it default.
Shane
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net