mysql select help
- by user344766
Hi I have a table that looks like this
id : productid : featureid
and would have the following data:
(1, 1, 16)
(2, 1, 21)
(3, 1, 25)
(4, 2, 16)
(5, 2, 21)
(6, 2, 27)
where featureid is a foreign key to another table.
I need to select products that have both featureids of 16 and 25, in which case productid 1 but not productid 2
Can someone show me an example of how to format this query.