Somehow, the doctrine does not allow me to compare two values โโof the bottom line: the name of the variable and the name of the user.
$qb = $this->getEntityManager()->createQueryBuilder(); $qb ->select('d') ->from('MyBundle:User', 'd') ->where('LOWER(d.firstName) LIKE :fName') ->setParameter('fName', strtolower('%'.$fName.'%')); $result = $qb->getQuery()->execute();
only when $ fName has an uppercase string (ie "Rob") will it return results such as "Robert" and "Robbie". But I want that even when $ fName is lowercase ("rob"), these results should appear. It seems d.firstNames are not going down. Why is this so?
source share