First of all, the phpdoc indicates a return value, but the function does not return any value.
Second,
// If grouping, all items in the order by must also be in the
// group by clause.
if ($this->groupby) {
$this->add_groupby($as);
}
This code will add *any* field that's in ORDER BY clause to the GROUP BY clause, however if the field is a formula it shouldn't be added to the GROUP BY clause because then MySQL at least will return an error.
Comments
Comment #1
merlinofchaos commentedFixed. Thanks!
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.