lessql
lessql copied to clipboard
SQL group by statement
Hello, How can I do a select using group by statement?
Currently, you can only use PDO directly as LessQL\Result only models these kind of queries:
SELECT
{* | select_expr, ...}
FROM table
[WHERE condition [AND condition [...]]]
[ORDER BY {col_name | expr | position} [ASC | DESC], ...]
[LIMIT count [OFFSET offset]]
In the next version (which I'm hoping to release soon), you'll be able to swap $db->post()->where(...)
with something like $db( "select * from post where &where group by some_col" )->where(...)
without any drawbacks.
Did this every get released? I'm also curious how to achieve this goal with aggregating result sets and performing math operations.