Code: Select all
SELECT DISTINCT product_id FROM db_product_to_category WHERE category_id <> 224
Category 225 -> Category 224 -> Category 223 -> Product
I want to eliminate all products that are a part of 224, but those products will still come back in the query because they are also under category 225 and 223. Basically once it's a part of category 224 I don't want that product returned no matter what other category it's a part of. How can I do this?