My search allows users to search games in my database. The only problem is that if a user types multiple terms within the search, it will only get hits if those multiple words are right next to each other.
Example:
searched term = Call Duty Modern
result = none
BUT if they input:
searched term = Call of Duty -or- Modern Warfare
result = Call of Duty Modern Warfare 1/2/3 etc.
here is my mysql query:
$query = "SELECT ID, title FROM games WHERE title LIKE '%{$title}%' AND platform = :platform LIMIT $startFrom,15";
$statement = $dbG->prepare($query);
$statement->bindValue(':platform', $platform);
$statement->execute();
$gamesLike = $statement->fetch(PDO::FETCH_ASSOC);
I know i should break up each word and search each term but im afraid it would eat up all my programs speed...
are there any specific MYSQL query tweaks i can use to achieve the result i need?
Any suggestions would be greatly appreciated
Thank you for your time