php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69795 PDO_ODBC + Vertica query fails when using parameters
Submitted: 2015-06-10 20:09 UTC Modified: 2020-10-11 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tob_filt at hotmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PDO ODBC
PHP Version: 5.6.9 OS: Linux Debian
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tob_filt at hotmail dot com
New email:
PHP Version: OS:

 

 [2015-06-10 20:09 UTC] tob_filt at hotmail dot com
Description:
------------
We're trying to use PDO to connect to a Vertica database and it works as long as we don't put parameters in our queries. For example, a simple query like this works no problem:

$stmt = $conn->prepare("Select Name from clients where ClientNum = 123");

However, when I do it like this, I get a blank page:

$stmt = $conn->prepare("Select Name from clients where ClientNum = :cl");
$stmt->bindValue(":cl", 123);



Test script:
---------------
$c = new PDO("odbc:Driver=Vertica;Server=X.X.X.X;Port=5433;Database=db;", "myUser", "myPassword");

$stmt = $c->prepare("SELECT ClientName FROM tblClients where ClientNum = :cl");
$stmt->bindValue(":cl", 123);
$stmt->execute();
	
while($res = $stmt->fetch(PDO::FETCH_ASSOC))
{
	echo $res['ClientName'] . "<br>";
}

Expected result:
----------------
I expect the name of the client to get displayed

Actual result:
--------------
A blank page

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-30 08:50 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-09-30 08:50 UTC] cmb@php.net
Would you get any error messages, if you set
PDO::ATTR_ERRMODE to PDO::ERRMODE_EXCEPTION?

And please check with any of the actively supported PHP versions:
<https://www.php.net/supported-versions.php>
 [2020-10-11 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 08:01:24 2020 UTC