0

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?

Jhourlad Estrella
  • 3,545
  • 4
  • 37
  • 66
  • possible duplicate of [Zend_Db subquery](http://stackoverflow.com/questions/3221285/zend-db-subquery) – Gordon Jul 27 '11 at 16:37
  • possible duplicate of [How Execture Query with Subqueries in ZF](http://stackoverflow.com/questions/4922246/how-execute-query-with-subqueries-in-zend-framework) – Gordon Jul 27 '11 at 16:38
  • Gordon, thanks for the feedback but the solution to the problem you linked to is applicable only to the specific problem being asked on that question. It will not always apply to most queries needing subqueries. – Jhourlad Estrella Jul 27 '11 at 16:56
  • If you think these are not duplicates then please point out why they didnt solve your specific problem and also show what you have tried so far. Otherwise I'd say they pretty much tell you all you need to know if you are not just looking for some copy and paste solution. – Gordon Jul 27 '11 at 17:48

1 Answers1

0

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.

regilero
  • 29,806
  • 6
  • 60
  • 99