Print Page | Close Window

Hit counter for auction site

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9673
Printed Date: 30 March 2026 at 5:58am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Hit counter for auction site
Posted By: photoshop_god
Subject: Hit counter for auction site
Date Posted: 09 February 2004 at 4:34pm

Hi everyone,

I have a very basic auction site that is free for people to sell and/or buy photo equipment online.  It's running on an access database (It should be SQL but the site is small.)  I have a page that views the details of a listing called paview.asp.  What I would like to do and maybe someone has already done something like this, is whenever someone views a particular listing it would increment by one in the tblAuctions database under that listing.  I have been chewing on this for a while and would love any input.

Thanks in advance




Replies:
Posted By: Mart
Date Posted: 09 February 2004 at 4:47pm

DECLARE @Current int

Select @Current = views FROM TABLE WHERE thing = thing

UPDATE TABLE SET views = @Current + 1 WHERE thing = thing



Posted By: photoshop_god
Date Posted: 10 February 2004 at 11:47am
Thanks I'll give it a try.


Posted By: ljamal
Date Posted: 10 February 2004 at 8:44pm
or even simpler
update table set field = field + 1 where primary = number

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net