Building a Simple Search Engine with PHP
Subject:   Giving Back
Date:   2007-03-05 03:59:33
From:   katie_P
Response to: Giving Back

Hi sorry to bother you, but do you know how to search for more than 1 word. There was code provided earlier on in this thread but it does'nt work for me

$result = mysql_query(" SELECT p.page_url AS url,
COUNT(*) AS occurrences
FROM page p, word w1, occurrence o1, word w2, occurrence o2
WHERE p.page_id = o1.page_id AND
w1.word_id = o1.word_id AND
w1.word_word = \"$keyword[1]\" AND
w2.word_id = o2.word_id AND
w2.word_word = \"$keyword[2]\" AND
GROUP BY p.page_id
ORDER BY occurrences DESC
LIMIT $results" );

I think you need to change an SQL statment, could you please help me