For example, if the search is Norton free 2010 Download How to order results like this Norton free download Norton download Norton 2010 for pc The first one includes 3 words of the search, so it is first. How to do this, thanks...
ORDER BY case when `description` LIKE '%norton%' then 1 else 0 end + case when `description` LIKE '%free%' then 1 else 0 end + case when `description` LIKE '%2010%' then 1 else 0 end + case when `description` LIKE '%download%' then 1 else 0 end DESC
Use MySql FULLTEXT index and pray it works There is no simple solution for a general rule for what you want. You can also use SPHINX or another advanced search engine for tricky search rules. But what you want there needs a human decision. I mean, consider that giving that search string i might want to order them differently and so does the search engine. FULLTEXT orders them by relevance ( his relevance not yours ). For that specific string the previous solution might work but i don`t think you need mysql and search engines only for that
İyi bir yöntem değil bence But its not a good method. For example think that user searched "best antivirus" and there are 1,000 results about that. It'll be too bad...