I need to get all matches in one column using PHP.
Example:
My table:
IP adress UserID
192.168.2.1 1
192.168.2.1 2
192.168.2.2 3
192.168.2.1 3
192.168.2.3 4
192.168.2.3 5
192.168.2.4 6
(I log IP adress always when user log in, so there can be more IP adresses for each userid)
Output what I need:
IP adress: 192.168.2.1 uses UserID´s: 1, 2, 3
IP adress: 192.168.2.3 uses UserID´s: 4, 5
(only if same IP adress use more users)
Is it possible? Maybe grab all lines into PHP and then try to find matches, or can it be done by MySQLi? Thanks.