Raw query builder

I am looking for a query builder similar to http://framework.zend.com/manual/1.12/en/zend.db.select.html. It seems PHQL only works by using Model classes. Is it any way to use PHQL or DB claesses to generat plain queries?