For examle my table at MySQL has values like;
> Foobar is cool
> foobar was in here
> Bla bla bla
I need result where search text is "foobar" even if user misspelled as "fobar"
> Foobar is cool
> foobar was in here
For examle my table at MySQL has values like;
> Foobar is cool
> foobar was in here
> Bla bla bla
I need result where search text is "foobar" even if user misspelled as "fobar"
> Foobar is cool
> foobar was in here
You could use a levenshtein function which returns the minimal number of character changes needed to transform one word into another word.
One implementation is shown here https://stackoverflow.com/a/4671557/5546380
This example just compares two words so you'd need to either modify this function or create a new one that calls this one and performs the levenshtein on each word within the field and return if it passes a certain threshold, for example 1 character change for "fobar" to be "foobar", 2 for "foba" to be "foobar".