Forum Moderators: open

Message Too Old, No Replies

Update database to show number of views?

Can this be done?

         

dickbaker

9:32 pm on Nov 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's a site I want to create that would allow people to find a particular type of company in their area. The companies would subscribe to this site. Visitors would select a city and state, and would then view the profiles of the various companies that are in the database.

I'm just wondering if there's a way to update the database each time someone views a particular company's profile, so that the subscribing company knows how many people have viewed the profile.

I'd be doing all this in ASP using an MSAccess database.

Any ideas would be appreciated.

garann

10:07 pm on Nov 21, 2003 (gmt 0)

10+ Year Member



Maybe I've missed the point, but could you just add another column to each company's database record? Then, immediately after you query the database on the page that displays their information, you could update that field to reflect one more view.

Or, if you wanted to go more sophisticated, you could also keep a collection of the businesses a given has viewed in a session variable, and maybe even write it to a cookie to reference next time they visit, and only update the record if the current business' ID isn't in that collection. That way you're only counting one view per user.

hth,
g.