I have two databases one with my main 'product' data and one with features.
For my example i will call them 'cars' and 'carFeatures'
So i have a search where users can search for cars, they select the features and it only returns cars with all the features.
So in my example, the user has selected electric windows (id = 34) and air conditioning (id = 21). Now one car has both these features.
This is the select query
SELECT * FROM cars c
JOIN carFeatures cf ON c.carId = cf.carId
WHERE cf.feature = '21'
AND cf.feature = '34'
GROUP BY c.carId
Its not returning any rows