catfan / Medoo

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

Support aggregate functions in select clause #192

Closed mrsoto closed 6 years ago

mrsoto commented 9 years ago

Select clause only support columns aliased or not but doesn't support aggregate functions in conjunction with group by clause

fmieres commented 7 years ago

+1

germansokolov13 commented 7 years ago

It's possible to write a simple string to the columns parameter of the select function. But if I write sum or avg in there Medoo breaks it for some reason. No complicated query can be written with this library. I am so disappointed.

catfan commented 7 years ago

@germansokolov13 It's possible on next version https://github.com/catfan/Medoo/issues/635

germansokolov13 commented 7 years ago

This is great news! I could also use query with full SQL statement but then I don't know how to pass an array of ids to the IN () expression of the WHERE sentence. Maybe I could work around this?

catfan commented 6 years ago

It's now released.

https://medoo.in/api/raw