View Single Post
  #5 (permalink)  
Old Nov 1st, 2007, 14:01
Eran Eran is offline
Junior Member
Join Date: Oct 2007
Location: Israel
Age: 21
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: My Page Statistic [Browser & OS]

amm, yes you can.

instead of looping all your database you can do it with a simpler query.
something like this:


HTML: Select all
sql = "SELECT * FROM pagerank WHERE ipaddress='" & ipadd & "'"

...

if not pg.EOF
    Set pg = pgConn.Execute("INSERT INTO pagerank (ipaddress, browser, serversoftware) VALUES ('" & ipadd & "', '" & browser & "', '" & serversw & "')")
I'm just not sure if my is statement is correct


secondly, why are need the redirection for?
you can make this code rows as a new page and add it to each page (you can add to the static the current page...).
that way, if a user will surf directly to "default.asp" the static will "know" him.

and to loss some extra load on your database you will create a cookie (with chocolate's chips), after you adding a new user (by unique IP) or verifying that this user is already in exists in your database, that says 'hi! did i surfed here before?'.
and finally you will add the damn question if the cookie exist than do the ip check.

good luck m8 :P
Reply With Quote