php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72153 Bind value does not work in HAVING fields
Submitted: 2016-05-04 11:27 UTC Modified: 2018-09-24 20:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: xprt64 at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: PDO SQLite
PHP Version: Irrelevant OS: Ubuntu
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: xprt64 at gmail dot com
New email:
PHP Version: OS:

 

 [2016-05-04 11:27 UTC] xprt64 at gmail dot com
Description:
------------
A bind value in the HAVING field does not filter correctly the result set.


Test script:
---------------
Sample code that does not work:
http://sandbox.onlinephpfunctions.com/code/a9f75aeab9bc30bc5a1e767e302a38fda797abff

A similar code that proves that the problem is at binding:
http://sandbox.onlinephpfunctions.com/code/83f49ed77170ac82a92a4cf4903726e8c3405dcc


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-27 16:15 UTC] cmb@php.net
-Package: SQLite related +Package: PDO SQLite
 [2018-09-24 20:49 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-09-24 20:49 UTC] cmb@php.net
The problem is here that the default parameter type is
PDO::PARAM_STR.  You have to ::bindValue() with PDO::PARAM_INT
explicitly[1].  See also request #54023.

[1] <http://sandbox.onlinephpfunctions.com/code/ee6f22eb5edf39a378e15a284a5d0e4a8712ef2d>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 02:01:30 2024 UTC