创建相同查询的方法很少:
$qb = $this->createQueryBuilder('u');
$qb
->select('COUNT(u.id)')
->where('u.email = :email'))
->setParameter('email', $email)
->getQuery();
和
$qb = $this->createQueryBuilder('u');
$qb
->select('COUNT(u.id)')
->where($qb->expr()->eq('u.email', $email))
->getQuery();
对于SQL注入,哪种情况更好,哪种情况更安全,更稳定?