Aloha!

There would seem to two ways to do this that I can think of off hand. 

One way would be to insert a record into a log table along with some pertinent info. 
Let's see, I would record the current time, the userreference number, a unique ID 
(auto-increment or equivalent) and which record in the original table that was looked 
at. This way I could count both unique session visits and repeat visits during a 
session, and I could also provide reports with breakdown number of visitors over 
periods of time. I do this for the Dr.Jamieson feature on the Jamieson Vitamins web 
site. This is how we have an idea of which ailments are the most popular and how they 
change with the seasons.

The other that I can think of off hand is to add an integer column to the table with a 
default value of zero and then increment it, ie: UPDATE ActionTable SET 
Counter=(Counter + 1) WHERE (LOG_ID = <@ARG ActionTable_uid1>). While this would 
provide a pretty accurate count it wouldn't let you find out the same people were 
visiting the record during their visit or if there were different people visiting the 
record. We started counting ailment visits using this method but stopped when Jamieson 
asked to see monthly reports for the reasons explained above.

If you come up with other good ideas to do this please be sure to pass them back here!

Anthony - 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scott Yoshinaga
Sent: Thursday, June 20, 2002 3:30 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Record Counter


Hi All...

I was wondeering if any of you have found a way to count how many times a
single record in a database is viewed.

Has anyone needed to do something similar to this?

aloha!
\\scott\\


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to