3

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

1 Answer 1

2

To build complex queries:

// Zend_Db_Table
$this->getAdapter()->quoteInto('(field1 = 1 AND field2 =2) OR ...');

Here is a comprehensive article for more information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.