How can I create a custom SQL query in Symfony2 using Doctrine? Or without Doctrine, I don\'t care.
Doesn\'t work like this:
$em = $this->getD
You can execute this code it works :
$em = $this->getDoctrine()->getEntityManager(); $result= $em->createQuery($sql)->getResult();