Re: Name searches for the spelling impaired
| From: | David Robley | Date: | Mon, 06 Sep 2004 02:11:59 +0000 |
| Subject: | Re: Name searches for the spelling impaired | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36063@lists.php.net to get a copy of this message | ||
On Mon, 6 Sep 2004 11:09, Pete Holsberg wrote:
> Is there a way to program MySQL so that it can find the
> name "Smyth" if the user looks for "Smith"? And similar
> mispellings that are similar in sound.
The SOUNDEX string function in mysql may be what you want.
http://dev.mysql.com/doc/mysql/en/String_functions.html
Something like
SELECT fields FROM table WHERE SOUNDEX(name) = SOUNDEX('searchvalue')
Cheers
--
David Robley
Lead me not into temptation, I can find it myself.