Hi

I am writing a search script that you will type in a search term and then the system will go off and search 2-3 tables at once and bring back the search results.

Now the proble that i have is that i am unsure how to go about sorting by relevance, i heard that it is possible and have had a look online but i have had no joy.

If anyone could point me in the right direction it would be much appreciated.

Thanks in advance.

I havent used MySQL that much, but i do know that to sort results you would use the "order by" clause, a small example:

Select name, id, gender from tblPerson order by name

You can use the keyword DESC to order objects in descending order.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.