Reputation: 2902
How can I do a SELECT like this using Zend Framework Table.
SELECT * FROM table WHERE (field1 = 0 AND field2 = 1) OR (field2 = 0 AND field3 = 1)
Using just $table->orWhere()
dont allow me to do multiple conditions inside of a parentheses
Upvotes: 3
Views: 1187
Reputation: 3682
To build complex queries:
// Zend_Db_Table
$this->getAdapter()->quoteInto('(field1 = 1 AND field2 =2) OR ...');
Here is a comprehensive article for more information.
Upvotes: 2