This is a discussion on Searching a DB within the MySQL forums, part of the Database Server Software category; --> Hi, I have created a search script using the phrase LIKE '%input%' but it fails if you are really ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have created a search script using the phrase LIKE '%input%' but it fails if you are really looking for Correct-Name but type in: Correctname Correct Name Correct- Name Is there a way to search maybe returning results by its levenshtein status for example, or am I missing something more simple? How can I search for this so that searching for any of the above 3 will definitely return Correct-Name? Thanks A |
| |||
| UKuser <spidercc21@yahoo.co.uk> wrote: > Hi, > > I have created a search script using the phrase LIKE '%input%' but it > fails if you are really looking for Correct-Name but type in: > > Correctname > Correct Name > Correct- Name > > Is there a way to search maybe returning results by its levenshtein > status for example, or am I missing something more simple? How can I > search for this so that searching for any of the above 3 will > definitely return Correct-Name? soundex('correctname') is the same as soundex('correct-name') etc. -- Pd |
| ||||
| On 24 May, 14:33, pd.n...@dsl.pipex.invalid (PeterD) wrote: > UKuser <spiderc...@yahoo.co.uk> wrote: > > Hi, > > > I have created a search script using the phrase LIKE '%input%' but it > > fails if you are really looking for Correct-Name but type in: > > > Correctname > > Correct Name > > Correct- Name > > > Is there a way to search maybe returning results by its levenshtein > > status for example, or am I missing something more simple? How can I > > search for this so that searching for any of the above 3 will > > definitely return Correct-Name? > > soundex('correctname') is the same as soundex('correct-name') etc. > > -- > Pd Thank you PD - very useful avenue! |