View Full Version : What would be the best way at doing this

12-04-2008, 01:37 AM
So I wrote a search script in PHP. And I want to make a "Top 10 searches". What would be the best thing to do? Considering resources and ease of coding

I was thinking about having every search stored in mysql and every single time that same search is made again it will +1 the amount of times searched.

What is everyone's suggestions?

12-04-2008, 01:47 AM
It depends on you're content. If its dynamic, you can create a search 'cache' and when performing you're searches, limit it to not including the cached results. Then use those cached results.
The trickier part would be to start combining search results. So, rip apart which results correspond to which keywords. Use these in new searches as well.

Search optimization is such a pain. I wish I knew how google did it all (I only know bits and pieces of that)...

12-04-2008, 02:11 AM
This has nothing to do with SEO.

I am basically donig a script that searches something on my site. The user types what they want to search, and it will pull results. What i want to do is get the top 10 most searched keywords.