We can execute raw SQL queries with Doctrine ORM.
If you already used this awesome library you already know all the features Doctrine supplies us at the time to interact with our database. The DQL (Doctrine Query Language) language is a very powerful and one of the most main feature of Doctrine, but, sometimes we have to face really advanced queries and with DQL it could be a little tricky to do it (in version 2 it will be improved).
If you need to do advanced and complicated queries (or not), Doctrine gives you the ability to execute native/raw SQL:
// we build the query
$query = "select id from tabla";
// gets the connection singleton
$con = Doctrine_Manager::getInstance()->connection();
// executes the query
$st = $con->execute($query);
// retrieves the results
$rs = $st->fetchAll();
// Or if you want the associative results
$rs = $st->fetchAssoc($query);