MySQL AND OR
In MySQL, the AND and OR conditions are also used in combination to filter the results obtained through the SELECT, INSERT, UPDATE and DELETE statements based on more than one conditions.
WHERE condition_1 AND condition_2 .. OR condition_n;
condition_1, condition_2… condition_n: They are used to specify the conditions to be strictly followed for selection.
SELECT * FROM items WHERE (id < 4 AND quantity > 50) OR id > 3;