-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Hello, first of all thanks for the great library Zepernick, it's perfectly implemented and allows very clean and DRY code!!
Just wanted to ask if you have an idea on how to use GROUP BY with the library?
When using an aggregate function, like SUM(), in select statements, MySQL requieres a GROUP BY clause otherwise it will aggregate the entire table instead of returning one row for each entry.
So i'm using appendToSelect like this in my model:
public function appendToSelectStr() { return array( 'stock' => 'SUM(st.stock)' ); }
But don't know where to add the GROUP BY clause. Any help is appreciated!
Thanks again!
Metadata
Metadata
Assignees
Labels
No labels