1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/codes/Working with objects - Component overview - Query - Aggregate functions.php
2007-02-23 20:57:38 +00:00

16 lines
271 B
PHP

<?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();
?>