Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 18045 программистов и 1566 роботов. Сейчас ищут 1472 программиста ...
->groupBy()
Вернуться к: DB_DataObject
->groupBy()
->groupBy() – Add group by condition
Synopsis
void $DB_DataObject->groupBy ( string $group )
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
Вернуться к: DB_DataObject