Jump to content

Command to search for something "similar"


MortimerJazz

Recommended Posts

That's not a very descriptive title, so let me try and explain what I want to do.

 

Basically, when a user searches through the database, I don't want the results page to show up blank if nothing matches the criteria which the user has inputted. Therefore if the database doesn't find an exact match, it would be nice if it brought up records which were similar to what the user wants.

 

So let's say someone's looking for a car and wants a 4 Door Red Audi. Nothing like that is in the database, but I'd like my script to effectively say "We don't have that, but we do have a 4 Door Blue Audi"

 

Can anyone suggest the best way of doing this please?

 

Thanks,

Link to comment
Share on other sites

Hi Fenway,

 

Thanks for the reply.

 

Most of the content is stored in VARCHAR fields or short text fields. Stuff like the number of doors is stored in NUMBER fields and any features like (leather seats, 4WD to keep the example above going) is recorded by a "TRUE" in the relevant field name.

 

Does that help at all?

Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.