Search Script for words with alternate spellings?

Hi All,

I need some help regarding a search script. On my website, a user can enter in a search term; however, a very common word they may choose to search for can be spelled two different ways.

How do I structure the search so that if one spelling is entered it automatically retrieves records with the other spelling as well?

My guess would be something along the lines of a IF/THEN statement, but not sure (?).

Can anyone suggest how to approach this issue?

Thanks!

Do you know all/some/most words that will be spelled two ways? You could set up a database table that has: ID, spelling 1, spelling 2. Then you would need to do a subquery within the search query. SubSelect Query

This function is probably going to come in handy. You’ll need a database of words though - perhaps there’s a dictionary app out there with an app to let you pull words.

Do you have a particular word in mind, or are you able to specify a short list of these words and their alternatives?

It would likely be only 2 -3 words at the most. Thanks for the suggestions so far.

Is the search you are doing an SQL LIKE search?

e.g.
"select heading from articles where body LIKE ‘%tree%’ "

The search is a full-text search constructed dynamically. I don’t really want to start tweaking with my database, but it seems I may have to do so in order to get this functionality.