|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-01 10:43 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 10:00:01 2025 UTC |
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...