Bug #69591 [Com]: PDO_DBLIB MSSQL more statements error

From: Date: Thu, 11 Feb 2016 14:28:09 +0000
Subject: Bug #69591 [Com]: PDO_DBLIB MSSQL more statements error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199165@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69591&edit=1

 ID:                 69591
 Comment by:         miracle at rpz dot name
 Reported by:        martinpop83 at gmail dot com
 Summary:            PDO_DBLIB MSSQL more statements error
 Status:             Open
 Type:               Bug
 Package:            PDO DBlib
 Operating System:   Linux
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

http://www.freetds.org/mars.html


Previous Comments:
------------------------------------------------------------------------
[2015-07-07 17:49:54] martinpop83 at gmail dot com

Yes, https://bugs.php.net/bug.php?id=65945
explain this problem.

But this DBLIB behavior is very annoying, because other drivers have support for more statements on
the same connection. In this case DBLIB is unusable for general database wrappers.

------------------------------------------------------------------------
[2015-07-02 18:02:29] christophe at delmas dot ch

Hi

I think this is related to https://bugs.php.net/bug.php?id=65945

Regards

------------------------------------------------------------------------
[2015-07-02 17:32:34] christophe at delmas dot ch

Hello

I have exactly same problem on ubuntu 14.04 LTS

Linux ubuntu 3.16.0-41-generic #57~14.04.1-Ubuntu SMP Thu Jun 18 18:01:13 UTC 2015 x86_64 x86_64
x86_64 GNU/Linux

packages :
freetds 0.91-5
php5 5.5.9+dfsg-1ubuntu4.9

Regards

------------------------------------------------------------------------
[2015-05-07 08:39:38] martinpop83 at gmail dot com

Description:
------------
I can't create two and more select statements with pdo_dblib. If I try it, pdo_dblib create
weird combination of statements into first statement and others returns false.

With pdo_sqlsrv (Windows server) and mssql (Linux server, FreeTDS) is everything ok.


Test script:
---------------
$pdo = new PDO("dblib:host=<host>;dbname=<dbname>", "username",
"password");

$stmtA = $pdo->query("SELECT 1 AS number, 'aaa' AS text");
$stmtB = $pdo->query("SELECT 'val' AS value");

print_r($stmtA->fetch(PDO::FETCH_ASSOC));
print_r($stmtB->fetch(PDO::FETCH_ASSOC));


Expected result:
----------------
Array
(
    [number] => 1
    [text] => aaa
)

Array
(
    [value] => val
)


Actual result:
--------------
Array
(
    [value] => val
    [text] => 
)

bool(false)



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



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


Thread (6 messages)

« previous php.bugs (#199165) next »