I am trying to retrieve properties which has multiple amenities.
But the table structure is: properties are in property table and amenities are associated with the property.
Amenities table has:
id property_id amenity_name ....
Now i want to search the amenities that have ‘parking’ and ‘elevator’ and so on.
select property_id from amenities where name = 'parking' and name = 'elevator';
I dont want to fire a join query for this.
So can anybody save me in this situation?
Try this -: