I have 2 tables one is dishes and the other is ingredients. First site will display all the dishes but when a user click on the onion checkbox then the query will display items which contain onion. If user click on potato checkbox then the query will display items which contain onion AND potato and so on. it will filter down the results according to the user inputs. It would be awesome if anybody can help.
SELECT *
FROM (`Ingredients`)
WHERE `category` IN ('1', '8')
AND `ingredients_name` = 'onion'
AND `ingredients_name` = 'potato'
AND `ingredients_name` = 'cream ';
Thanks