|  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
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
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:
Bug Type:
From: xprt64 at gmail dot com
New email:
PHP Version: OS:


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

Test script:
Sample code that does not work:

A similar code that proves that the problem is at binding:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-27 16:15 UTC]
-Package: SQLite related +Package: PDO SQLite
 [2018-09-24 20:49 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-09-24 20:49 UTC]
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] <>
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Oct 03 02:01:24 2023 UTC