Dears,
I am try to run a my sql query using phalcon custom query.
Here is the query
$query = new Phalcon\Mvc\Model\Query\Builder();
$query->columns(array('parent_id', "activity_user" => "GROUP_CONCAT(CONCAT(module,'|','element_id') ORDER BY created_at )"));
$query->from('Feeds');
$query->groupBy(array( 'module', 'parent_id'));
$query->orderBy("created_at DESC");
$query->limit($perPage,$startValue);
Once I try to use the Ordering with Group by I got the following snytax error
Syntax error, unexpected token ORDER, near to ' BY created_at )
I tried to run the query thorugh mysql and it's worked with no error.
So why this error comes and how I can fix it.
Thanks