calculate bonus group by torrent_id and peer_id

This commit is contained in:
xiaomlove
2022-04-21 17:09:48 +08:00
parent 06cb452fdd
commit a33394c2aa
2 changed files with 2 additions and 2 deletions

View File

@@ -5530,7 +5530,7 @@ function calculate_seed_bonus($uid): array
$A = 0;
$count = $torrent_count = 0;
$torrentres = sql_query("select torrents.added, torrents.size, torrents.seeders from torrents LEFT JOIN peers ON peers.torrent = torrents.id WHERE peers.userid = $uid AND peers.seeder ='yes' group by torrents.id");
$torrentres = sql_query("select torrents.added, torrents.size, torrents.seeders from torrents LEFT JOIN peers ON peers.torrent = torrents.id WHERE peers.userid = $uid AND peers.seeder ='yes' group by torrents.id, peers.peer_id");
while ($torrent = mysql_fetch_array($torrentres))
{
$weeks_alive = ($timenow - strtotime($torrent['added'])) / $sectoweek;