|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56757 PDO::quote() returns NULL instead of false
Submitted: 2005-12-29 06:34 UTC Modified: 2006-03-23 14:03 UTC
From: Assigned:
Status: Closed Package: PDO_ODBC (PECL)
PHP Version: 5_1 CVS-2005-12-29 OS: Windows
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:
New email:
PHP Version: OS:


 [2005-12-29 06:34 UTC]
PDO::quote() returns NULL instead of false. Maybe only the documentation is wrong at .

I currently have to use

function dbQuote($sValue) {
  return "'" . str_replace("'", "''", $sValue) . "'";

to quote the value. I guess the quote style depends on the real driver so that's the reason it can't be done by PDO?

Reproduce code:
$p = new PDO('odbc:driver={Microsoft Access Driver (*.mdb)};Dbq=beispieldatenbank.mdb');

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-23 14:03 UTC] tony2001 at phpclub dot net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 06:01:23 2021 UTC