previous->orderBy() (Previous) (Next) Automatic Table Linking and Joinsnext

View this page in Last updated: Sun, 28 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

->groupBy()

->groupBy() – Add group by condition

Synopsis

void $DB_DataObject->groupBy ( string $group )

Description

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

Parameter

  • string $group - Grouping condition

Note

This function can not be called statically.

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

Example

Setting the Group by

<?php
$person 
= new DataObjects_Person;
$person->groupBy('name');
$person->groupBy('age, eye');
$person->find();
?>

Resulting SQL

        
SELECT * FROM person GROUP BY name, age, eye
previous->orderBy() (Previous) (Next) Automatic Table Linking and Joinsnext

Download Documentation Last updated: Sun, 28 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.