#30137 [Opn->Fbk]: php losts one of two mysql links
| From: | edink@php.net | Date: | Sat, 06 Nov 2004 06:04:06 +0000 |
| Subject: | #30137 [Opn->Fbk]: php losts one of two mysql links | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68742@lists.php.net to get a copy of this message | ||
ID: 30137
Updated by: edink@php.net
Reported By: sh4dow at php dot pl
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: Win2000
PHP Version: 5.0.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-09-17 19:55:36] sh4dow at php dot pl
Description:
------------
when i try to make 2 difrent connection to the mysql, php lost one of
them, and all query are making by only one connection. Where is the
second ?
Reproduce code:
---------------
$link1 = mysql_connect('localhost', 'user1', '***') or
die(mysql_error());
mysql_select_db('baza1', $link1) or die(mysql_error());
$link2 = mysql_connect('localhost', 'user2', '***') or
die(mysql_error());
mysql_select_db('baza2', $link2) or die(mysql_error());
$query1 = mysql_query("SELECT * from users LIMIT 0,1", $link1);
while ($r1 = mysql_fetch_assoc($query1)){
var_dump($r1);
}
$query2 = mysql_query("SELECT * from users LIMIT 0,1", $link2);
while ($r2 = mysql_fetch_assoc($query2)){
var_dump($r2);
}
Expected result:
----------------
should be two difrent results
Actual result:
--------------
only one result, the second give an error or null
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30137&edit=1