I was just wondering if there is a method in Zend Framework I could use to add subqueries. I believe I have already seen one but not sure at the moment for it has been 2 years since I’ve worked on a project using the framework. I’m more into Codeigniter now but I have to move to Zend Framework for an upcoming project.
Any ideas if this is possible?
A simple google search will lead you to this result, which contains severals ways of performing Subqueries with Zend Framework. Basically it consists of using plain SQL in your Zend_Db_Select queries (and you can always extract your subquery SQl by using the ToString() method).
Now, are you really sure you need subqueries? There is really a small amount of case where a subquery is the real solution instead of a Join.