I want to select set of records from a table(process) process it and delete it.
I am running the following query to select. How to I delete all the selected records of group by statement in symfony2.
createQuery('SELECT process FROM WebBundle:process process
GROUP BY process.tag')->getResult();
How do I delete all the rows selected using symfony2?
You can use query builder to do that.
$qb = $em->createQueryBuilder();
$qb->delete('Processes', 'p');
For more info, just check documentation - DQL - Delete queries.