hey guys ,
I installed sucessfully my torrent add on ..so thought to SUM all USERS completed torrrents and show in userstats ...but I can´t show it
if I put this code
returns nothing.
but if I put this code where I confirm that he read & sum userid 1´s completed torrent then I can see the total completions .
can anyone please help me with showing completed torrents for each and every user
I installed sucessfully my torrent add on ..so thought to SUM all USERS completed torrrents and show in userstats ...but I can´t show it
if I put this code
$completes = $db->query_read("SELECT SUM(completed) AS com FROM ".TABLE_PREFIX."attachment WHERE userid = '".$userinfo['userid']." ' ");
while ($row = $db->fetch_array ($completes))
{
$completed = $row["com"];
}
returns nothing.
but if I put this code where I confirm that he read & sum userid 1´s completed torrent then I can see the total completions .
$completes = $db->query_read("SELECT SUM(completed) AS com FROM ".TABLE_PREFIX."attachment WHERE userid = 1");
while ($row = $db->fetch_array ($completes))
{
$completed = $row["com"];
}
can anyone please help me with showing completed torrents for each and every user