php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50206 PDO::quote with parameter PDO::PARAM_INT
Submitted: 2009-11-17 17:46 UTC Modified: 2009-11-18 13:31 UTC
From: php at die-optimisten dot net Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.2.11 OS: Debian 5 Lenny
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at die-optimisten dot net
New email:
PHP Version: OS:

 

 [2009-11-17 17:46 UTC] php at die-optimisten dot net
Description:
------------
PDO::quote() with second parameter PDO::PARAM_INT, quotes an integer like a string.

PS: phpinfo() says:
PHP Version 5.2.6-1+lenny3
Cant it select in your drop-down.

PPS: Your captcha is hard.

Reproduce code:
---------------
$Pdo = new PDO('mysql:host=127.0.0.1', 'root', 'secret');
$Pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$Pdo->query('USE test');

echo $Pdo->quote(42, PDO::PARAM_INT);

Expected result:
----------------
42

Actual result:
--------------
'42'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-18 13:31 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The param type is largely used by the driver when escaping for binary 
and non-binary data differs. All other types will be treated the same by 
most drivers.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jan 06 11:01:31 2025 UTC