#native_company# #native_desc#

Slapping together a search engine Page 3

By Clay Johnson
on July 30, 2000

Part 2: Searching the Table
Now you have an easy to-use table of keywords and their associations. How do
you query this table? Here’s
what I do:
First I format each searchterms passed into the script as
‘word1′,’word2′,’word3’ and stick it in a string
called $querywords.
Then I throw them into this SQL query:

SELECT count(search_table.word) as score, search_table.qid,your_table.blob

FROM search_table,your_table

WHERE your_table.qid = search_table.qid AND search_table.word


GROUP BY search_table.qid