Hello all. How can I make a PHP search an item for the exact phrase in the database? The way I currently have it works fine, but the problem is when trying to search for entries with special characters in them, such as ' or / or \. For example, if I search for "George" it will find the item in the database called "George" and return it. However, if I search for "George's" it will not find that item in the database even if it exists. What is the best way to correct this? Thank you.
$term = mysql_real_escape_string($_GET['term']);
$SQL_QUERY = "
SELECT GAMEDB_Games.GameID, GAMEDB_Games.PublisherID, GAMEDB_Games.GameTitle, GAMEDB_Games.ReleaseDate, GAMEDB_Games.RarityC, GAMEDB_Games.RarityI, GAMEDB_Games.RarityB, GAMEDB_Games.ScanCAvailable, GAMEDB_Games.ScanIAvailable, GAMEDB_Games.ScanBAvailable, GAMEDB_Games.RomDownloadAvailable, GAMEDB_Games.RomDownloadID,
FROM GAMEDB_Games, GAMEDB_Platform, GAMEDB_Publisher
WHERE GAMEDB_Games.SearchKeywords = '$term'
AND GAMEDB_Games.PlatformID = GAMEDB_Platform.PlatformID
AND GAMEDB_Games.PublisherID = GAMEDB_Publisher.PublisherID ";
$sql = mysql_query($SQL_QUERY);