Bug #72153 [Opn->Nab]: Bind value does not work in HAVING fields

From: Date: Mon, 24 Sep 2018 20:49:30 +0000
Subject: Bug #72153 [Opn->Nab]: Bind value does not work in HAVING fields
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217222@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72153&edit=1 ID: 72153 Updated by: cmb@php.net Reported by: xprt64 at gmail dot com Summary: Bind value does not work in HAVING fields -Status: Open +Status: Not a bug Type: Bug Package: PDO SQLite Operating System: Ubuntu PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: 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> Previous Comments: ------------------------------------------------------------------------ [2016-05-04 11:27:00] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72153&edit=1

« previous php.bugs (#217222) next »