void $DB_DataObject->groupBy ([string $group])
void $DB_DataObject->groupBy
Adds a group by condition. Calling this without any arguments clears the Group Condition
string $group - Grouping condition
Эта функция не должна вызываться статически.
Пример 34-1. Setting the Group by
$person = new DataObjects_Person; $person->groupBy('name'); $person->groupBy('age, eye'); $person->find();
Пример 34-2. Resulting SQL
SELECT * FROM person GROUP BY name, age, eye