Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search by relevance with 1 query?

Status
Not open for further replies.

bdichiara

Programmer
Oct 11, 2006
206
US
I am currently using this query for searching items in my database.
Code:
SELECT * FROM links WHERE (description LIKE '%".$like."%' OR (plain_content LIKE '%".$like."%' AND plain_content <> '')) AND deleted <> '1' ORDER BY description ASC

I'm wanting to step this up a notch, because now I'm doing 8 separate queries for each table in my database. Also, this is only searching for whole phrases, and I would like for it to search for whole phrases, as well as each individual word. I would then like it to order the results by relevance.

This is probably asking a lot. Is there a tutorial or something the explains an efficient way to accomplish this?

_______________
_brian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top