Can anyone help me with this code
Code: Select all
my $gen_ip = $db->SelectARef("SELECT INET_NTOA(ip) as ip_txt, SUM(money) as money, COUNT(*) as downloads
FROM IP2Files
WHERE created>NOW()-INTERVAL 48 HOUR
GROUP BY ip
ORDER BY money DESC
LIMIT 20");
I need to list all ip's (only premium files / users can make money on our site). So if file is uploaded by normal user or guset this query will not display all IP's that downloaded file