1

Is it possible with mySQL to get results when the spelling is not exactly correct. E.g. a visitor fills out the field with Amstrdam (note that the "e" is missing). Is there a function for mySQL that also shows results similar to Amstrdam: -Amsterdam -Amsteldam

angelina
  • 51
  • 2
  • As per your other relation question, this might be what you are after: http://stackoverflow.com/questions/369755/how-do-i-do-a-fuzzy-match-of-company-names-in-mysql-with-php-for-auto-complete – Mike Jun 23 '10 at 07:54

2 Answers2

1

You could use

expr1 SOUNDS LIKE expr2

see http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#operator_sounds-like

Janick Bernet
  • 20,544
  • 2
  • 29
  • 55
0

You can use the like with % wildcard:

where name like `Amst%`

and similar permutations.

Sarfraz
  • 377,238
  • 77
  • 533
  • 578