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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This weeks most 'searched for keyword' is... 1

Status
Not open for further replies.

techskool

Technical User
Jun 20, 2002
151
GB
Lets say i have a link to my search script, with a querystring for what its searching for.

I then want to populate the querstring with a variable of the most searched for keyword on my site, and set this link up to reflect that.

1. The text between the anchors would be dynamic
2. The querystring searchterm would be dynamic

How would i record this dynamic variable from the most poular searches people had done on my site?

Thanks

Dave ;)
 
Well, you would have to create a database entry somewhere for each search term and implement a counter to increment each tie a user searched that term. The link itself would be relatively easy, as you could just request the data from the database:
Code:
sql = "SELECT TOP 1 searchword FROM SearchTable ORDER BY searchcount"

Then output like so:
Code:
<a href=&quot;searchresults.asp?keyword=<%=rs(&quot;searchword&quot;)%>&quot;>Search the Most Searched Term!</a>

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top