Page 1 of 1

searching for users with same ip

Posted: Mon Jun 14, 2010 11:49 am
by nite4000
Hey,

I want to on a page have it display the list of users with more then one account by ip address.

I know this isnt hard but nothing i have tried works.

If anyone can help

Thanks

Re: searching for users with same ip

Posted: Mon Jun 14, 2010 12:00 pm
by andyhoneycutt
Could you be a little more specific? Are the users' IP Addresses stored somewhere? Are you just trying to find the IPs of all concurrent sessions? Not really sure what you're asking...

Re: searching for users with same ip

Posted: Mon Jun 14, 2010 12:56 pm
by nite4000
the ip address is stored in a members table.

Re: searching for users with same ip

Posted: Mon Jun 14, 2010 1:06 pm
by Kurby
This is a sql query:

SELECT COUNT(*), ip_address FROM members
GROUP BY ip_address
HAVING COUNT(*) > 1

This will give you all the ip_addresses that have multiple members. Obviously the column and table names could be different.