I have a DQL query like:
$em->createQuery(" SELECT r FROM WeAdminBundle:FamilyRelation r WHERE r.col like :query ")
Now I want to change "col" depending on various parameters. How can i achieve this with DQL since the normal setParameter doesn't work here.
Answer author Ast-derek
Tickanswer.com is providing the only single recommended solution of the question Doctrine, escape variable field name in DQL under the categories i.e sql , doctrine , dql , . Our team of experts filter the best solution for you.