I am trying to fetch record which contains similar word in string.I know %% trick in mysql to fetch required data like
select * from products where Name like '%LORFAST%'
but what if dont have exact word for filter??? like instead of "LORFAST" if i write "LORFST" then it will not return any record.
select * from products where Name like '%LORFST%'
Expectation : even i miss any character it should return nearby match. above query should return "LORFAST TAB." any idea how to do that??
http://sqlfiddle.com/#!9/30b949/2
Code
create table `products` (
`Id` int (11),
`Name` varchar (900)
);
insert into `products` (`Id`, `Name`) values(1,'LORFAST TAB.');
insert into `products` (`Id`, `Name`) values(1,'SPORIDEX REDIMIX DROP');
insert into `products` (`Id`, `Name`) values(1,'MICROGEST 400MG');
insert into `products` (`Id`, `Name`) values(1,'ANTIPLAR PLUS TAB');
insert into `products` (`Id`, `Name`) values(1,'DECA DURABOLIN 100MG');