->groupBy()

->groupBy() – Ajoute une condition 'group by'

Synopsis

void $DB_DataObject->groupBy ( string $group )

Description

Ajoute une condition 'group by'. L'appel à cette méthode sans argument efface la condition de groupe.

Parameter

  • string $group - Condition de groupe

Note

This function can not be called statically.

Example

Définission d'un 'group by'

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

SQL résultant


SELECT * FROM person GROUP BY name, age, eye
Ajoute une condition 'orderBy' (Previous) Automatic Table Linking - ::
getLink(), ::
getLinks(), ::
joinAdd(), ::
selectAs() (Next)
Last updated: Sun, 29 Aug 2010 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.