#34324 [Opn->Bgs]: mysql_select_db not honoring connection ids
| From: | sniper@php.net | Date: | Thu, 01 Sep 2005 08:43:07 +0000 |
| Subject: | #34324 [Opn->Bgs]: mysql_select_db not honoring connection ids | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84278@lists.php.net to get a copy of this message | ||
ID: 34324
Updated by: sniper@php.net
Reported By: ehassler at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windows 2000
PHP Version: 5.0.4
New Comment:
It might work if you passed the correct link to mysql_query().
Previous Comments:
------------------------------------------------------------------------
[2005-09-01 10:37:40] ehassler at gmail dot com
Description:
------------
When maintaining two connections to the same mysql server
mysql_select_db requests with the connection id supplied are setting
both connections to use that database.
Reproduce code:
---------------
$silver = mysql_connect('localhost','user','pass', true);
mysql_select_db('silver',$silver);
$lemon = mysql_connect('localhost','user','pass', true);
mysql_select_db('lemon',$lemon);
$silver_result = mysql_query('select * from errors') or print("The
query has become invalid: \"".mysql_errno().":
".mysql_error()."\"");
var_dump($silver);
var_dump($lemon);
Expected result:
----------------
query should execute on silver.errors
Actual result:
--------------
I get an error that lemon.errors does not exist, even though both
$silver and $lemon have different connection ids...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34324&edit=1