Say there's a table user
as below:
+----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+----------------+
| id | int(11) unsigned | NO | PRI | NULL | auto_increment |
| name | char(64) | NO | | NULL | |
| img_hash | varchar(32) | NO | | | |
+----------+------------------+------+-----+---------+----------------+
And I want to make a fuzzy match on field name, and there are multiple names in a list pending match as:
["name1", "name2", "name3", ...]
I'm tring to do with :
select
id, name, img_hash
from
user
where name like "%name1%"
or name like "%name2%"
or name like "%name3%"
...
If there better way to do a fuzzy matching work in this problem?
Thanks.