Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $qb = $this->createQueryBuilder('u');
- $qb->leftJoin('u.admin', 'admin')
- ->Select($qb->expr()->count('admin'))
- ->addSelect('admin.username')
- ->addGroupBy('admin.username');
- array(1) { [0]=> array(2) { [1]=>
- int(1)
- ["username"]=>
- string(5) "admin" }}
- $e = $this->getDoctrine()->getRepository(User::class);
- $qb = $e->createQueryBuilder('u')
- ->join('u.statictics', 's')
- ->select('COUNT(s.id) as sCnt')
- ->addSelect('u.username')
- ->addGroupBy('u.username')
- ;
Add Comment
Please, Sign In to add comment