Edit report at http://bugs.php.net/bug.php?id=51602&edit=1

 ID:               51602
 User updated by:  courtois at nouvo dot com
 Reported by:      courtois at nouvo dot com
 Summary:          mysql link looses database selection with multiple
                   links
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          MySQL related
 Operating System: debian lenny
 PHP Version:      5.2.13

 New Comment:

checking some parameters with other users...


Previous Comments:
------------------------------------------------------------------------
[2010-04-19 17:10:25] courtois at nouvo dot com

Description:
------------
when using 2 databases at the same time with 2 links, database selection
is lost.

Test script:
---------------
<?php



  $db1 = mysql_connect("localhost","user1","pass");

  mysql_select_db("database1",$db1);



  $db2 = mysql_connect("localhost","user2","pass");

  mysql_select_db("database2",$db2);





  if(!(mysql_query("select * from mytable",$db1)))

       print "error:".mysql_error();

     else

       print "ok";

?>

Expected result:
----------------
should print "ok" 

works fine with windows (builtin mysql) but not with debian lenny

Actual result:
--------------
error:Table 'database2.mytable' doesn't exist



the select is done on database2 although database1 was selected on the
$db1 link.




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51602&edit=1

Reply via email to