Is there any other way to perform this far from LIKE and REGEX , I am trying to check if string A contain string B or a little part of string B like example below
string A = "United State of America"
string B = "America"
String B should be checked if it exist in String A
Currently i have used REGEXP and LIKE but sometimes it give me false output, please check mycodes below and give any suggestion.
//Using REGEXP
$first_five = substr($data[0], -7, 7);
$query = mysql_query("SELECT * FROM 'football' WHERE 'TEAMS' REGEXP '$first_five'");
//Using LIKE
$query = mysql_query("SELECT * FROM 'football' WHERE 'TEAMS' LIKE '%$first_five%'");`
Any idea which query can perform same job like my above querys??????