Like, Regexp and Rlike are all great fuctions, but they only find correctly spelt words.
Non of them will find Bon Jovi search for Jon Bovy.
If a similar_text function is set to ex. 80% it would make Bon Jovy a match.
But to use this function I have to run the entire database and then match the search to the artist name in the database, and then echo the name on the screen if the similar_text function find them to match.. like this
$artist=mysql_query("SELECT * FROM db ORDER BY artistname");
while ($row = mysql_fetch_array($artist)){$artistname=$row[artistname];
similar_text($artistsearch,$artistname,$percent);
IF ($percent > 80) {echo $artistname;}
}
This will only echo the artistnames more than 80% correct compared to the search and it would print Bon Jovi when searching for Bon Jovy.
BUT.... I have to run the entire database.
So isn't it possible in any way to put the similar_text functino in the query line or use some other function in the query line that matches like similar_text and not like regexp and like... which both matches only 100% correct spelling.