I'm having problems with creating a simple SQL select statement.
The table is as follows
table - products2features
fields - prod_id, feature_id
The user on the website selects from various features, and I want to determine which single product matches each feature selected. So let say the user selects feaure_id 1 and 3 and 4, I want to return the prod_id, which in this case is 49.
Here's what I tried,
WHERE products2features.feature_value_id =1
AND products2features.feature_value_id =3
AND products2features.feature_value_id =4
WHERE products2features.feature_value_id IN (1,3,4)
But I only want the prod_id that matches each of the selected features.
It seems like it should be so simple, but I guess it too late for my brain to work.