i beg to differ its not mysqli coding at all mysql
PHP 4.4 TESTED -- OK
PHP 5.1 TESTED -- OK
PHP 5.6 TESTED -- OK
PHP 7.1 TESTED -- OK
PHP 7.2 TESTED -- OK
PHP 7.3 TESTED -- OK
from down is mysqli
PHP 5.6 TESTED -- OK
PHP 7.1 TESTED -- OK
PHP 7.2 TESTED -- OK
PHP 7.3 TESTED -- OK
also its known in the cleanup this part not working on home torrents on mysqli and mysql
Code:
//LOCAL TORRENTS - GET PEERS DATA AND UPDATE BROWSE STATS
//DELETE OLD NON-ACTIVE PEERS
$deadtime = get_date_time(gmtime() - $site_config['announce_interval']);
SQL_Query_exec("DELETE FROM peers WHERE last_action < '$deadtime'");
$torrents = array();
$res = SQL_Query_exec("SELECT torrent, seeder, COUNT(*) AS c FROM peers GROUP BY torrent, seeder");
while ($row = mysql_fetch_assoc($res)) {
if ($row["seeder"] == "yes")
$key = "seeders";
else
$key = "leechers";
$torrents[$row["torrent"]][$key] = $row["c"];
}
$res = SQL_Query_exec("SELECT torrent, COUNT(torrent) as c FROM comments WHERE torrent > 0 GROUP BY torrent");
while ($row = mysql_fetch_assoc($res)) {
$torrents[$row["torrent"]]["comments"] = $row["c"];
}
$fields = explode(":", "comments:leechers:seeders");
$res = SQL_Query_exec("SELECT id, external, seeders, leechers, comments FROM torrents WHERE banned = 'no'");
while ($row = mysql_fetch_assoc($res)) {
$id = $row["id"];
$torr = $torrents[$id];
foreach ($fields as $field) {
if (!isset($torr[$field]))
$torr[$field] = 0;
}
$update = array();
foreach ($fields as $field) {
if ($row["external"] == "no" || $field == "comments") {
if ($torr[$field] != $row[$field])
$update[] = "$field = " . $torr[$field];
}
}
if (count($update))
SQL_Query_exec("UPDATE torrents SET " . implode(",", $update) . " WHERE id = $id");
}
basically it telling the database the update is locking the torrent table up till clean up done there be no home nor seedbox working torrents