ID: 34324 Updated by: [EMAIL PROTECTED] 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