I try to explain what I need through an example: Lets say I want to compare all the strings in my database with a give string. I have to find all the strings that contain at least %70 of characters of my given string. For example if the given string is "abcedfg", I can accept "abedfgm" (6 of 7), but not "dfghigk" (only 3 of 7). The way that I know now is to "SELECT" all the fields and then using PHP compare them but the problem is that the database is very huge and this takes too long. If I use something like this: SELECT * FROM myTable WHERE myField LIKE '%a%' OR myField LIKE '%b%' OR myField LIKE '%c%' OR myField LIKE '%e%' OR myField LIKE '%d%' OR myField LIKE '%f%' OR myField LIKE '%g%' PHP: I would get slightly less results bu still a lot more than I should return because it returns all the strings that have 1 of 7 character in them whereas I want about 5 of 7. If I changed OR to AND, I would only get those which have all the characters. I hope I explained it correctly. Any Idea guys?