How to write this SQL query in Doctrine 2.0 (and fetch results)?
(SELECT \'group\' AS type, CONCAT(u.firstname, \" \", u.surname) as fullname, g.na
$connection = $em->getConnection(); $query = $connection->prepare("SELECT field1, field2 FROM table1 UNION SELECT field3, field4 FROM table2 UNION SELECT field5, field6 FROM table3 "); $query->execute(); $result = $query->fetchAll();