I have a basic search engine. In one script, it populates a MYSQL table with words scanned in the html web page. Based on one word search, it ranks the results when the words appeared the most in the web page.
But I need to work on multiple term querying. Is there a way to search multiple terms from my query below?
$keyword = addslashes( $_POST['keyword'] );
$results = addslashes( $_POST['results'] );
/* Execute the query that performs the actual search in the DB: */
$result = mysql_query(" SELECT p.page_url AS url,
COUNT(*) AS occurrences
FROM page p, word w, occurrence o
WHERE p.page_id = o.page_id AND
w.word_id = o.word_id AND
w.word_word = \"$keyword\"
GROUP BY p.page_id
ORDER BY occurrences DESC
LIMIT $results" );