Trying to run a query with symfony and I get this error:
[Syntax Error] line 0, col 83: Error: Expected end of string, got 'username'
This code throws that error:
$query = $em->createQuery(
'SELECT username
FROM BLOGBlogBundle:user
WHERE username= :usrname'
)->setParameter('usrname', $usr);
$products = $query->getResult();
What am I doing wrong?