Is MySQL compatible with parentheses in WHERE clauses? Does it work like PHP where
WHERE (condition1 OR condition2) AND condition3
coincides with
if ((condition1 || condition2) && condition3)
Yes, it will work. I, for example, had something similar to this request in a project:
SELECT * FROM translation WHERE (language='en' AND translation_label='lbl_submit') OR (language='en' AND translation_label='lbl_submit_btn')
Yes, they are calculated in the same way, although I'm not sure if they are in the same order.