When I have this:
SELECT * FROM orders_chosenoptions
RIGHT JOIN orders ON (orders.ID = orders_chosenoptions.order_id)
WHERE orders.deal_id = 982
AND orders.status = 'new'
It gives me 41 rows. Now these rows their orders_chosenoptions.product_id is either 110 or 111
SELECT * FROM orders_chosenoptions
RIGHT JOIN orders ON (orders.ID = orders_chosenoptions.order_id)
WHERE orders.deal_id = 982
AND orders.status = 'new'
AND (orders_chosenoptions.product_id = 110 OR orders_chosenoptions.product_id = 111)
Gives me 35 rows?! Like it stops the right join somehow?
There is no other rows with product id other than 110 or 110.
Try this::