HosipLan

Untitled

May 4th, 2011
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. $qb = $this->createQueryBuilder('c')
  2.     ->select('c', 'c1.id parent_id', 'COUNT(c.id) subcount')
  3.     ->where('c.deleted = 0')
  4.     ->groupBy('c.parent');
  5.  
  6. if ($ids) {
  7.     $qb->andWhere($qb->expr()->in('c.parent', $ids));
  8. }
Advertisement
Add Comment
Please, Sign In to add comment