Page 1 of 1

Enum database search

Posted: Fri Oct 29, 2004 5:41 am
by LizzyD
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??)

Posted: Fri Oct 29, 2004 7:07 am
by kettle_drum
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.

Posted: Fri Oct 29, 2004 8:45 am
by Draco_03
keetle_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.
I concur

You should read about database designing (google is your friend)
I'm assuming that you did the design here.

Posted: Fri Oct 29, 2004 10:58 am
by LizzyD
Thanks very much - I'll think about it - sounds like a lot of work!! cheers for your replies though - much appreciated!

LizzyD