catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

HAVING COUNT(id) = ? is that kind of combination possible with medoo? #213

Closed istals closed 5 years ago

istals commented 9 years ago

I tried different variations to get right query, but with no success.

SELECT x.id, y.t_id, y.x_id    FROM x LEFT JOIN y ON x.id = y.t_id 
WHERE y.t_id IN (1, 2)
GROUP BY x.id
HAVING COUNT( y.t_id ) = 2

this is query what I'am trying to get with medoo, is that possible?

VeeeneX commented 9 years ago

I think It's not possible in this version, I had had the same problem

catfan commented 5 years ago

That's can be possible via raw object: https://medoo.in/api/raw