php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
Description:
------------
(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:
---------------
http://homepage.ntlworld.com/jared.williams/php5/Sqlite_bindParam.zip

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:
--------------
bool(false) 

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-10 02:30 UTC] wez@php.net
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] mike@php.net
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: Tue Mar 19 05:01:29 2024 UTC