How soundex function can be used if I have following problem :
name | Soundex_value
Kap Pup Nup | K151 ( came from soundex('Kup Pup Nup')
Kap | K100
Now if I want to get all the rows where name field contains any soundex value of 'Kap'.
If I type 'Cap' then it should give me both rows and If I type 'Kup' then also.
Anyone can suggest me a solution ?
So far, I come up with this solution :
select * from table where soundex(`name`) like concat(soundex('kap'),'%');
But this query is working fine if there is only one word in 'name' field.