|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: Jared dot Williams1 at ntlworld dot com
New email:
PHP Version: OS:


 [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: Thu Jul 18 05:01:28 2024 UTC