I have a MySQL database containing items with a name.
I also have an array of keywords.
My plan is to send multiple queries to the database using something like
foreach($keywords as $keyword){
$result = $mysqli->query("SELECT * FROM items WHERE name LIKE %$keyword%");
}
After that I want to sort the results after the highest amout of matches, so that the item found using the most queries is on top while others are down below...
My questions: Is this recommendable? Is this a performance killer? If my idea is stupid, is there a better way to do this?