1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Query - Aggregate functions.php

17 lines
289 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>