I\'m trying to do something like the PHP array_intersect. I have the following table
array_intersect
CREATE TABLE `recipes_ingredients_items` ( `id` INTEGER(11) D
Try this:
SELECT item_id FROM recipes_ingredients_items WHERE id IN (71, 2, 22) GROUP BY item_id HAVING COUNT(*) = 3