mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Added nedeed "ORDER BY" in sql query
Co-Authored-By: Sergey <31823239+SeAnSolovev@users.noreply.github.com>
This commit is contained in:
parent
195e0163ac
commit
4c4c810b36
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ foreach ($peers_in_last_minutes as $t) {
|
|||
}
|
||||
// Last xx seconds
|
||||
$peers_in_last_sec = array();
|
||||
$rowset = DB()->fetch_rowset('SELECT COUNT(*) AS peers FROM ' . TMP_TRACKER_TABLE . " GROUP BY update_time DESC LIMIT $peers_in_last_sec_limit");
|
||||
$rowset = DB()->fetch_rowset('SELECT COUNT(*) AS peers FROM ' . TMP_TRACKER_TABLE . ' GROUP BY update_time ORDER BY update_time DESC LIMIT' . " $peers_in_last_sec_limit");
|
||||
foreach ($rowset as $cnt => $row) {
|
||||
$peers_in_last_sec[] = sprintf('%3s', $row['peers']) . (($cnt && !(++$cnt % 15)) ? " \n" : '');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue