Posts: 427
Name: Stuart
Location: Glasgow, Scotland
|
I seem to be full of problems today....
Firstly, I have 3 tables [ flats, facilities and hasFacilities (which links the first two with IDs) ]. Flats i think is notreally important here. facilities contains an ID and a name. hasFacilities contains facilityID and flatID linking the first two together from the normalizatio process.
Im creating a search form where checkboxes are shown, one for each of the facilities within that table. The user will select the relevant ones (any number - none to all) and I want to then query the database to return the flats ( the flatID ) which have all the facilities that the user has selected.
I pretty sure this can be done but i just cant get my head around the query that i need to create - whether thats because i dont have the right knowledge i dont know...
Any helps or points in the right direction are appreciated.
Cheers
Stoot
Table Structures:
flats( flatID, title ... etc )
facilities( facilityID, name )
hasFacilities( flatID, facilityID )
Last edited by stoot98; 10-11-2006 at 12:18 PM..
|