I’d like to do a Zend db update with an OR clause. What would be the equivalent statement to:
UPDATE mail
SET message_read = 1
WHERE id = 5
OR id = 10
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When calling
Zend_Db_Adapter::update(), multipleWHEREconditions will automatically be combined usingAND(line 698 of Zend/Db/Adapter/Abstract.php in function _whereExpr).You can get around this by creating your own
Zend_Db_Exprwhich you will use as theWHEREcondition and it will be left untouched.For example:
If you had additional
WHEREconditions, they would be combined with theORcondition by anAND.Example: