#36639 [Bgs->Opn]: mssql_select_db(); didnt work for multiple connection
| From: | Satria at dreamweb dot co dot id | Date: | Thu, 09 Mar 2006 01:03:51 +0000 |
| Subject: | #36639 [Bgs->Opn]: mssql_select_db(); didnt work for multiple connection | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94068@lists.php.net to get a copy of this message | ||
ID: 36639
User updated by: Satria at dreamweb dot co dot id
Reported By: Satria at dreamweb dot co dot id
-Status: Bogus
+Status: Open
Bug Type: MSSQL related
Operating System: NT2K
PHP Version: 5.1.2
New Comment:
Description
resource mssql_connect ( [string servername [, string username [,
string password]]] )
There is no 4th Parameter
Previous Comments:
------------------------------------------------------------------------
[2006-03-08 21:06:43] fmk@php.net
The MSSQL Extension shares the internal connection as long as host,
user and password are the same. To avoid this you can use an optional
4th parameter (new_link = true|false). Setting this to true will force
the system to create a new link internaly.
------------------------------------------------------------------------
[2006-03-07 14:23:32] Satria at dreamweb dot co dot id
there is another solutions for this
(if this were MySQL Function)
force mysql_connect to open newLink
but http://php.net/mssql_connect
didnt have that parameter on the connect Option
------------------------------------------------------------------------
[2006-03-07 06:59:11] Satria at dreamweb dot co dot id
Description:
------------
mssql_select_db() also override Used Database on the another
Connection
Reproduce code:
---------------
$sqlLink1=mssql_connect($host,$user,$pass);
$SecondLINK=mssql_connect($host,$user,$pass);
/*Yes, both connection on same Machine*/
mssql_select_db('db1',$sqlLink1);
/*Until here, still no problem*/
mssql_select_db('db2', $SecondLINK);
//Second time DB Select also will override $sqlLink1, is this Bugs?
or... its what should it be ?
Expected result:
----------------
mssql_select_db() only affected on the $param2 connection
Actual result:
--------------
-
------------------------------------------------------------------------
[2006-03-07 05:10:18] Satria at dreamweb dot co dot id
Description:
------------
mssql_select_db() also override Used Database on the another Connection
Reproduce code:
---------------
$sqlLink1=mssql_connect($host,$user,$pass);
$SecondLINK=mssql_connect($host,$user,$pass);
/*Yes, both connection on same Machine*/
mssql_select_db('db1',$sqlLink1);
/*Until here, still no problem*/
mssql_select_db('db2', $SecondLINK);
//Second time DB Select also will override $sqlLink1, is this Bugs?
or... its what should it be ?
Expected result:
----------------
mssql_select_db() only affected on the $param2 connection
Actual result:
--------------
-
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36639&edit=1