在Doctrine中,我可以做到:
public function getCount()
{
$q = $this->createQuery('q')
->select('*')
->addSelect('count(q.name) as count')
->groupBy('q.name')
->orderBy('count DESC');
return $q->execute();
}
Run Code Online (Sandbox Code Playgroud)
如何在Symfony 1.4中的Propel中做同样的事情?