->groupBy() – Add group by condition


void $DB_DataObject->groupBy ( string $group )


Adds a group by condition. Calling this without any arguments clears the Group Condition


  • string $group - Grouping condition


This function can not be called statically.

The quote_identifiers configuration option will not affect data sent to groupBy.


Setting the Group by

= new DataObjects_Person;
$person->groupBy('age, eye');

Resulting SQL

SELECT * FROM person GROUP BY name, age, eye
Add an order by condition (Previous) Automatic Table Linking - ::
getLink(), ::
getLinks(), ::
joinAdd(), ::
selectAs() (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.