Currently I'm using the following query: (I'm using the following implmenetation of levenshtein()
SELECT title FROM db_full WHERE MATCH (`Title`) AGAINST ('Harry Potter and the Deathly Hallows' IN BOOLEAN MODE) AND levenshtein('Harry Potter and the Deathly Hallows', `Title`) BETWEEN 0 AND 15
I was wondering if it was faster to use the combination of MySQL + PHP something like below
$testQ = "SELECT title FROM db_full WHERE MATCH (`Title`) AGAINST ('Harry Potter and the Deathly Hallows' IN BOOLEAN MODE)";
}
result = $conn->query($testQ);
while ($row = $result->fetch_assoc()) {
$distance = levenshtein($v,$row['title']);
// using the if condinational for the distance
}
Which procedure would be faster and more efficient?