|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[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
[2020-10-11 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 07:00:01 2025 UTC |
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