php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36053 Multiple params fail with new version of PHP
Submitted: 2006-01-17 16:19 UTC Modified: 2006-01-30 01:00 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: tzlee at tzlee dot com Assigned: wez (profile)
Status: No Feedback Package: PDO related
PHP Version: 5.1.2 OS: Linux
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: tzlee at tzlee dot com
New email:
PHP Version: OS:

 

 [2006-01-17 16:19 UTC] tzlee at tzlee dot com
Description:
------------
Using a param (e.g. :id) more than once in a prepared statement used to work with my older PHP 5.0.4 (PDO 1.0.2 and PDO_MySQL 1.0.1) but now breaks with PHP 5.1.2 (using default PDO and PDO_MySQL ext included in download)

Reproduce code:
---------------
$stmt = $db->prepare("SELECT id, name FROM table WHERE id = :id OR parent = :id");
$stmt->assignValue(':id', 1, PDO::PARAM_INT);
$stmt->execute();

Expected result:
----------------
Should work

Actual result:
--------------
Failed with General Error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-17 16:22 UTC] tony2001@php.net
Assigned to the maintainer.
 [2006-01-22 19:30 UTC] iliaa@php.net
What version of MySQL are you using?
 [2006-01-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-04-03 12:16 UTC] phpbugs at filofox dot com
I can verify this bug, using MySQL 4.1.11 on PHP 5.1.2.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 21:01:27 2025 UTC