|  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
 [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-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 29 08:01:24 2020 UTC