php - Searching a database with forgiveness. -


I have a database of 30k elements, each game name

I'm currently using:

  SELECT * gamelist likes '%%% $ search %%%' or '% $ search%' LIMIT by name WHERE 10 "  

for the search bar.
However, it can really be very attractive about things:

  'animal crossing : Wild World '  

See, many users will not know that': 'is in that phrase, so when they start searching:

  Animal world will not appear.  

How can I Can SQL be more forgiving?

Change non-alphanumeric characters with wildcards in search parameters so that Animal Crossing Wild World becomes % Animal% Crossing% Wild% World% and filter it on.

Comments