1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/en/_old-docs/Working with objects - Component overview - Query - Aggregate functions.php
2007-10-17 21:16:49 +00:00

17 lines
274 B
PHP

<code type="php">
$q = new Doctrine_Query();
$q->from('User(COUNT(id))');
// returns an array
$a = $q->execute();
// selecting multiple aggregate values:
$q = new Doctrine_Query();
$q->from('User(COUNT(id)).Phonenumber(MAX(phonenumber))');
$a = $q->execute();
</code>