2007-04-13 00:52:30 +04:00
|
|
|
|
2007-04-14 01:49:11 +04:00
|
|
|
<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>
|