|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56364 Binding parameters causing incorrect results.
Submitted: 2005-04-03 10:55 UTC Modified: 2005-10-23 09:27 UTC
From: Jared dot Williams1 at ntlworld dot com Assigned:
Status: No Feedback Package: PDO_SQLITE (PECL)
PHP Version: 5_0 CVS-2005-04-03 (dev) OS: Windows 2000/IIS
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
40 - 34 = ?
Subscribe to this entry?

 [2005-04-03 10:55 UTC] Jared dot Williams1 at ntlworld dot com
(Using latest 5.0.4 official release together with the PDO drivers included in the "Collection of PECL modules for PHP 5.0.4 [1,342Kb] - 31 Mar 2005")

A particular bindParam() call is seemingly preventing the correct results from being returned, it returns no rows.
(It runs correctly when using mysql & pgsql drivers.)

When the parameter is inserted directly into the SQL, the query runs as expected.

Rewritten the query a few different ways, but still has the same result. (works fine when its not bound, but not when it is)

Reproduce code:

Single PHP page, creates a in mem sqlite db, schema, sample data, and runs the query twice, once using bindParam for topicCount parameter second with it directly inserted into the SQL.

Expected result:
array(1) { [0]=> array(2) { ["productID"]=> string(1) "2" ["name"]=> string(24) "Apple Cinema 23" Display" } } 

repeated twice.

Actual result:

array(1) { [0]=> array(2) { ["productID"]=> string(1) "2" ["name"]=> string(24) "Apple Cinema 23" Display" } } 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-10 02:30 UTC]
It definitely seemed weird when I looked through your test case a little while back.
Can you try the next available snapshots to see if it fares any better?
 [2005-10-23 09:27 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 18:01:30 2024 UTC