I'm using a search function I found online, and I modified it to fit in with my website. Now, I can pretty much understand everything it does, except for this one part, and this part seems to be the problem. When I enter a search, and it searches articles by their title, it will only return one word titles. Anything with multiple words, even if it's the exact same as the title in the database won't come up. This is part of the script I'm using
$arrWords = explode(" ", $search_keywords);
if(sizeof($arrWords) == 0 || $search_keywords == "")
{
echo "Error!</b></td></tr>
<tr>
<td class=\"text\">";
echo "You didn't enter any keywords";
}
else
{
include ("rdatabase.php");
for($i = 0; $i < sizeof($arrWords); $i++){
$query = "SELECT id FROM games WHERE title = '{$arrWords[$i]}'";
$result = mysql_query($query);
The script works off of two queries, and I'm almost positive this is the one causing the problem. Any idea on how to change this around so it will select all ids where the title contains the keyword? Thanks for your help.