PHP 4.0 Bug #10032: mysql_connect not making a new connection each time it is called
| From: | kwatt at buybuddy dot com | Date: | Tue, 27 Mar 2001 22:21:52 +0000 |
| Subject: | PHP 4.0 Bug #10032: mysql_connect not making a new connection each time it is called | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50101@lists.php.net to get a copy of this message | ||
From: kwatt@buybuddy.com
Operating system: red hat linux
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: mysql_connect not making a new connection each time it is called
In the documentation, it says that one way mysql_pconnect and mysql_connect is that in pconnect, it
opens a new connection only if there is not one open to the same host,username,password tuple.
However, mysql_connect does the same thing.
The thing I find annoying about the fact that mysql_connect not automatically opening a new
connection is that there are some functions that change the attributes of a connection overall.
When you call mysql_select_db on a connection, you are changing the database for every instance that
is referencing that same connection. There is no way to make one connection that refers to one
database, and one that refers to another.
Really, there should be two mysql_connect functions:
1) mysql_new_connect
and
2) mysql_connect
mysql_new_connect would make a new connection to the database no matter what.
--
Edit Bug report at: http://bugs.php.net/?id=10032&edit=1