1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/docs/en/_old-docs/Working with objects - Component overview - Query - Aggregate functions.php

17 lines
274 B
PHP
Raw Normal View History

<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>