How to run plain mysql queries in Symfony 2, just like this:
$query = $this->db->run('select * from table');
$rs = $this->db->fetchAll($query);
foreach($rs as $r) {
...
}
It's well explained how to do it with some examples, here:
http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/native-sql.html