Heya Guys,
Quick question, my friend and I have been going nuts over this because we cant figure it out, we've tried subqueries and the such and nothing.
We have a form that has multiple checkboxes:
Community Features
[] Pool
[] Tennis Courts
[] Concierge
[] ...
We built our database as follows (kept it brief for sanity purposes)
LISTINGS
listingID, address
1001, 9000 NE 2nd Avenue
1002, 1234 Easy Street
PROPERTY FEATURES
propFeatID, featName
1, Pool
2, Tennis Courts
3, Concierge
4. ...
Linking the two, is a FeatureLinker
listingID, propFeatID
1001, 1
1001, 3
THE QUESTION
Say a property we wanted to find a property that has more than one of those features, in this example property 1001, has more than one feature (Pool, Concierge). How would you go about doing that?
We tried: SELECT listingID FROM FeatureLinker WHERE propFeatID = 1 AND propFeatID = 3.
The reason that didn't work is because it is a column, I'm looking for rows. So we've determined that.
How should I go about tackling that? I tried a few subqueries but my mind kept looping around into nothingness.
Thanks 😃