hi there!
I hope someone can help me... I have a hotel database with over 100 field headings and 3000 rows.
The field headings are all facilities such as tennis, creche, restaurant etc...
The values under each heading for all 3000 hotels are either Y or N, indicating whether or not a specific hotel has each specific facility.
I want to put a search box on my site using this information, where a user can type one or more keywords, eg. tennis, creche, golf and get a list of hotels which matches.
But i can't work out how to do it!! I've been searching all the forums but no luck. I'd be grateful if anyone could point me in the right direction! Thanks very much!
LizzyD
(P.S Some headings say stuff like "Iron / Ironing Board" - I'd also like, if possible for the search to work if someone enters Iron, or if they enter Ironing Board - is this possible??)
Enum database search
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
I would personally change this database so that each hotel simply held one field for what services it offered and let that field hold a list of id numbers that links to the facility.
At the moment it will be hard for you to search as you have to search through a hundred fields, whereas if you changed your database you would simply have to search the facilty table to get the ID's of the specified services and then check to see if that ID is present in the second table.
At the moment it will be hard for you to search as you have to search through a hundred fields, whereas if you changed your database you would simply have to search the facilty table to get the ID's of the specified services and then check to see if that ID is present in the second table.
I concurkeetle_drum wrote:I would personally change this database so that each hotel simply held one field for what services it offered and let that field hold a list of id numbers that links to the facility.
You should read about database designing (google is your friend)
I'm assuming that you did the design here.