Describe the bug
When i use
['HAVING' => [count(tbl2.id) = 0]
and where tbl2 is a joined table with a table tbl1, then is this is converted in the PDO-select statement as "HAVING count = 0" in stead of "HAVING count(tbl2.id) = 0" like I'm suspecting.
SELECT tbl1.id, tbl1.col2, count(tbl2.id) AS count
FROM tbl1 LEFT JOIN tbl2 ON tbl1.tbl2_id = tbl2.id
GROUP BY tbl1.id
HAVING count = 0
ORDER BY tbl1.id ASC
Expected output
SELECT tbl1.id, tbl1.col2 count(tbl2.id) AS count
FROM tbl1 LEFT JOIN tbl2 ON tbl1.tbl2_id = tbl2.id
GROUP BY tbl1.id
HAVING count(tbl2.id) = 0
ORDER BY tbl1.id ASC
Describe the bug When i use
['HAVING' => [count(tbl2.id) = 0]
and where tbl2 is a joined table with a table tbl1, then is this is converted in the PDO-select statement as "HAVING count = 0" in stead of "HAVING count(tbl2.id) = 0" like I'm suspecting.Information
Detail Code
sql-string output:
Expected output