Replies Back to Article

Hit counters for all the individual records of one table in the database.

Problems...
June 25, 2001 by rubs eguan

Hi guys, I've tryed to implement this into my site... I try to account how many times a user logs into my site and store in a field. I've followed all the steps you speak above very carefully, but althoug no error message is displayed when cliking the submit button, the field is not updated in anyway... I wonder if there is any special feature to take into account...

Thank you.rubs

I have the same problem..no update in field
July 2, 2001 by Joost Meij

I'm using an SQL server database and made added a number field with 0 as standard value. I also get no error message..but no updat is done and i cant find anything wrong with the command! Is it different for an SQL database?

Besides Request.QueryString
July 3, 2001 by Neafevoc Marindale

I'm wondering if there was an alternative method besides using Request.QueryString("stringHere")?

I was able to get Request.Form to work with it.

But I want to Request("SomethingElse") if possible that's not done through Form nor QueryString.  Like just setup up some value on the page just to trigger the counter once.

The problem I found is that if I don't have any QueryString on my URL, the page will error out :(

very easy.
September 24, 2001 by syr prize
thx for tip. very easy + runs good
Counting the first click only
October 19, 2001 by Werner BH
If the same user clicks twice on the same link, it adds 2 to hits field. Is there any way to count only the FIRST click of an user?
Count user visits
February 18, 2002 by Joachim Bergling

I's like to update a field in my user database that's called c_visits by selecting the right user with the MM_Username session that's created when I use the login scripts inculded i UD.

I use this update statement:
UPDATE Users
SET c_visits = c_visits + 1
WHERE username = Paramusername

And set the variable as:

paramusername = session("MM_Username")

I get this error message:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/test/default2.asp, line 15

Anyone who can help me out?

/Joachim

Error
March 28, 2002 by M E

Trying to get the counter working, keeps on displaying this error message

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Pubname = John Barleycorn'.
/testsite/htdocs/diplaydetails.asp, line 61

Kind Regards

Matt

RE: Problems...
March 27, 2003 by Matthew Green
Guys, I have implementd this but it is increasing the count for every product, not the individual product in my DB - any ideas where I am going wrong?
How to implement this in my database
September 16, 2003 by Hans Konings
Doesn't work in SQL?
October 1, 2003 by K S

Shouldn't this procedure also work with a SQL database?  It's not working for me.  Any advice welcome...

Babar's breaking out the John Maddan Plays
October 12, 2003 by John Pels***
Babar's breaking out the John Maddan Plays on that command box, personally I would have faked that request object, bumped off of the sql querystring and went straight for mysql free result, thereby retreiving the recordsets and communicating the data.
Great! But now ......
December 6, 2003 by Chris Sweeney

This worked first time for me - a great step forward!

The detail page increments the 'hit' field by one when the page is called.  However, on this detail page, I have a link to an external URL - anybody know how I can counts hits on that particular field?

Thanks again,

 

Phew.....
April 5, 2004 by michael worrall

Thankyou so much who ever wrote this article.... spent sooo long now trying to do this!!!!!!

 

 

Awsome!!!
May 1, 2004 by Tamas B
Thank you! Thank You! I have been searching for exactly a script like that for almost a week but I could not find anything out there. I had no idea that it was this simple. Took me less than a minute to do and works great. A blessings from the sky! Thank you.
Error hit counter
June 23, 2004 by bruno i

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id ='.

/news.asp, line 16

this method needs a ip check feature
March 2, 2006 by mustafa senoz

Dear Mubarak,
First of all, thank you for your valuable tutorial it worked very well for me.
But every time i clicked reload in detail page page adds 1 to total hits.
I think this method needs a ip check feature for real hits counting.

Would you kindly advise if you have such as solution.

thanks
rgrds

mustafa

ASP.net
January 21, 2009 by Rusty Monette

Is there any way to do this with asp.net?  I see this works with asp but asp.net does not have the command stuff in it.

 

Thanks