0

I'm creating Anti MultiAccount in MySQL.I have big problems with MultiAccounts in my game so I need strong security. Now I'm make that every connection in my game log in mysql.With information about ip and time login. Every time when player connect on my server I use this.

INSERT INTO MULTI(IP, Name,Country,date) VALUES ('127.0.0.1', 'Test' , 'Croatia' ,UNIX_TIMESTAMP())

Now I don't know how that Admins can see possible multiaccounts so I need:

1) How to get all user IP from MULTI table but without repetition same IP's

2) How to get all connected players but without repetition

For example:

A player is login with IP adress 127.0.0.1

B player is also login with 127.0.0.1 IP adress

So A and B player are conncted!They are possible multiaccounts,how to get them(But without repetition of course)

(Sorry for English)

Jure
  • 3
  • 2
  • As you're probably aware, IP addresses change, and can be easily changed. Detection through IP address isn't a great way to handle the isntance of multi's. – Adam Jul 18 '18 at 18:57
  • 1
    Possible duplicate of [Select Rows with matching columns from SQL Server](https://stackoverflow.com/questions/15101457/select-rows-with-matching-columns-from-sql-server) – Adam Jul 18 '18 at 18:58
  • Yes I know.But I have protection for VPN.But with this I can detect users which enter on more accounts from same IP(There are a lot of them) – Jure Jul 18 '18 at 19:01

1 Answers1

0

Not sure what exactly do you want to select, but here is my approach:

http://sqlfiddle.com/#!9/91208b/1

SELECT DISTINCT multi.*  FROM multi
INNER JOIN 
 (SELECT ip
  FROM multi 
  GROUP BY ip
  HAVING COUNT(DISTINCT name)>1
  ) filter
ON multi.ip = filter.ip
Alex
  • 16,739
  • 1
  • 28
  • 51