Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Knowing what has been queried???

Author  Topic 

jacisme
Starting Member

34 Posts

Posted - 2006-09-16 : 17:27:01
Thank you for your help.

I run a website which uses SQL 2000 and VB ASP. I would like to add a section to the site which posts the most popular data being queried from my SQL server. I'm sure this is possible, but I don't know where to start. Please let me know if any of you need specifics regarding my data and set up.

Thanks again for the help! :)

JAC

nr
SQLTeam MVY

12543 Posts

Posted - 2006-09-16 : 18:54:44
Presumably you have a search facility so that would be the obvious place to add the functionality.
If you are looking for the actual data items returned then record the PK's returned for each search.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jacisme
Starting Member

34 Posts

Posted - 2006-09-16 : 19:14:41
I do have a very simple search function, but I would like the actual records that are being accessed by the visitors and have that in a way so that I could show the info on my site.

Here is a link to my site:

http://www.gamersunderground.net/index.html

I'm looking for a way to show what games are most popular for the day or month or so on.

Many thanks,
Jason
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-09-16 : 19:37:17
Simplest is to do the search via an SP. In the SP record the PK's (probably an id) for each result and use that to show the info.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jacisme
Starting Member

34 Posts

Posted - 2006-09-16 : 19:39:12
Not too sure why you are referring to Searching? I am trying to see what and where my visitors have been on my site and have that info postable (if thats a word) on my site.

What do you mean by record the pk??? into what? how?

I am trying to keep track of and some how log specific requests made to my db so that I can display that info on my site for puposes of showing popular games (again based on requests by the visitors to the db).

Are there any other takers on my original question???

Thank you.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-09-17 : 05:12:06
The visitors request info which is obtained from the db - that's a search - might return many items but sounds as if it always returns one by your response.
It is best if that database access is performed via a stored procedure.

The stored procedure can log to a table what is returned. The pk is the primary key which is the reference of the data returned.
You can interrogate that table to display information about data access on your site.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jacisme
Starting Member

34 Posts

Posted - 2006-09-17 : 11:13:58
Ah, Okay... then how do I log that info to a table. I am already using a SP.
Go to Top of Page
   

- Advertisement -