Replies Back to Article
Hit counters for all the individual records of one table in the database.
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'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?
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 :(
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
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
Shouldn't this procedure also work with a SQL database? It's not working for me. Any advice welcome...
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,
Thankyou so much who ever wrote this article.... spent sooo long now trying to do this!!!!!!
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
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
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