Brandon, Tom & All,
Thanks for your help!
select count (distinct ipaddr) is exactly what I need...
It was pointed out to me, upon trying that statement, that it will not work with 3.22 which my hosting provider (communitech.net) uses but will with 3.23.
So...I'm contacting them to find out how that can be done.
You guys are awesome!
Dinos
Brandon Schnell wrote:
so lets break that down. count() returns a count of every row and is limited by the where clause.
distinct count() returns only unique count() values. since count() only returns one value the distinct will have no effect.
"select distinct count()" is exactly the same as "select count()" both of which result in counting every single row which isn't what the this guy wants (Dinos, say something if this isn't true).
from the example sql he has posted (but he hasn't specifically said so) it looks like he doesn't care about the total ip addresses but the total UNIQUE ip addresses. so if one person visits the site once but another person visits the site 10 times he wants a query that will return 2 hits (two unique ip addresses and presumably completely different people. the count will go down for users connecting via a proxy server and up for modem users. and lets not forget all of those siamese twins surfing the net, would you count that as one hit or two?!?)
to get the total....