Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Hit counter for auction site
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hit counter for auction site

 Post Reply Post Reply
Author
photoshop_god View Drop Down
Newbie
Newbie
Avatar

Joined: 21 January 2004
Location: United States
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote photoshop_god Quote  Post ReplyReply Direct Link To This Post Topic: Hit counter for auction site
    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

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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



Edited by Mart
Back to Top
photoshop_god View Drop Down
Newbie
Newbie
Avatar

Joined: 21 January 2004
Location: United States
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote photoshop_god Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2004 at 11:47am
Thanks I'll give it a try.
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2004 at 8:44pm
or even simpler
update table set field = field + 1 where primary = number
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.