php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56307 Duplicate placeholder doesn't behave properly
Submitted: 2005-02-18 17:21 UTC Modified: 2005-02-26 21:26 UTC
From: sean at caedmon dot net Assigned: wez (profile)
Status: Closed Package: PDO (PECL)
PHP Version: 5.0.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 - 18 = ?
Subscribe to this entry?

 
 [2005-02-18 17:21 UTC] sean at caedmon dot net
Description:
------------
17:16 < theSean> is it normal that in PDO, if I use the same placeholder, twice, in a prepared query, only the first placeholder
                 gets replaced? (ie: bug, or expected behaviour?)
17:16 <@_Wez_> theSean: which driver? it should be smart enough to tell you it broke?
17:17 < theSean> MySQL
17:17 <@_Wez_> hmm
17:17 < theSean> did I explain clearly?
17:17 <@_Wez_> I think so
17:17 <@_Wez_> you have ' :foo, :foo' somewhere in your sql
17:17 <@_Wez_> and only the first :foo gets replaced?
17:17 <@_Wez_> the other ends up as an empty string?
17:18 < theSean> yep exactly. (for an insert query)
17:18 < theSean> well, they're ints, so the second ends up: 0
17:18 <@_Wez_> can you open a bug report for that; it's a PDO level bug
17:18 < theSean> sure.

(sorry for the lazy report)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-26 21:26 UTC] wez@php.net
Appears resolved in CVS... could be that this was really PECL Bug #3545, masked as a poorly reported problem ;-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC