I'm trying to get all my products , from A specific categories and without some products from those categories .
i did this query:
SELECT `ps_product`.`id_product`,`ps_product_lang`.`name`
FROM `ps_product`, `ps_product_lang`
WHERE
`ps_product`.`id_product` = `ps_product_lang`.`id_product`
AND `ps_product`.`id_manufacturer` NOT IN (3,7,10,11,13,14,19,22,23,24,25,30,31,32,33,34,37,38,41,42,43,44,45,46,47,48,49,50)
AND `ps_product_lang`.`name` not in ( '%OLP%' ,'%LicSAPk%' ,'%SPLA%','%SA OLP%')
The problem is that i'm still getting products with the string 'SPLA' or 'SA OLP' - because the NOT IN clash with the categories
How to solve it ?