Help With MySQL Query

Discussion in 'Server Operation' started by P4rD0nM3, Sep 25, 2009.

  1. P4rD0nM3

    P4rD0nM3 New Member

    Hey guys, this must be a weird question but...I'm trying to find duplicates of IP addresses having the same first two/three octects.

    I know how to find duplicates for an IP address...here's how.

    SELECT player_ip, COUNT(player_ip) AS NumOccurrences FROM amx_bans GROUP BY player_ip HAVING ( COUNT(player_ip) > 1 )

    However, in that database no two player_ip are the same (obviously).

    So what I need to find is the first two octets. XXX.XXX.BLAH.BLAH that are the same. Is that possible?
     

Share This Page