How do I add complex where clause to Zend Table Select?

Posted by AD on Stack Overflow See other posts from Stack Overflow or by AD
Published on 2010-04-14T18:44:46Z Indexed on 2010/04/14 18:53 UTC
Read the original article Hit count: 270

I searched the Web and could not find anything that would show me a good solid example. My question is basically this:

How do I convert this:

SELECT * FROM table WHERE ((a = 1 AND b = 2) OR (c = 3 OR c = 4)) AND d = 5;

To Zend syntax similar to this:

$this ->select() ->from($this->_schema.'.'.$this->_name) ->where('a = ?', '1');

So how can it be done?

Thank a lot in advance.

© Stack Overflow or respective owner

Related posts about zend-db-table

Related posts about zend-framework