|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69591 PDO_DBLIB MSSQL more statements error
Submitted: 2015-05-07 08:39 UTC Modified: 2016-09-12 22:16 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: martinpop83 at gmail dot com Assigned:
Status: Not a bug Package: PDO DBlib
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: martinpop83 at gmail dot com
New email:
PHP Version: OS:


 [2015-05-07 08:39 UTC] martinpop83 at gmail dot com
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");


Expected result:
    [number] => 1
    [text] => aaa

    [value] => val

Actual result:
    [value] => val
    [text] => 



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-02 17:32 UTC] christophe at delmas dot ch

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

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

I think this is related to

 [2015-07-07 17:49 UTC] martinpop83 at gmail dot com
Yes, 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.
 [2016-02-11 14:28 UTC] miracle at rpz dot name
 [2016-09-12 22:16 UTC]
-Status: Open +Status: Not a bug
 [2016-09-12 22:16 UTC]
See comments on #65945.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Nov 29 21:03:58 2022 UTC