I would like find the correct syntax for the SET line:
Doctrine_Query::create()
->update('Media m')
->set('m.fallback IF(m.id = ?, 1, 0)', $id) <-- not correct
->execute();
Thanks for any help!
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.
I think that could be done with two queries:
I don’t know if it suits you, but at least that will do what you want. May not work out of the box, as I don’t have Doctrine 1.2 at hand, so can’t test this. But I think the idea is clear 🙂