From c4a482c6390440e3fe50331fdc45e89ee5682ae5 Mon Sep 17 00:00:00 2001 From: Yury Pikhtarev Date: Sat, 21 Jun 2025 03:24:20 +0400 Subject: [PATCH] refactor(stats): improve database row fetching in tr_stats.php - Updated the method of fetching rows from the database to use a more streamlined approach with `DB()->fetch_row()`. - Extracted the first column value directly from the result array for clarity and maintainability. --- admin/stats/tr_stats.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/stats/tr_stats.php b/admin/stats/tr_stats.php index 4cd8733c3..db1fc444d 100644 --- a/admin/stats/tr_stats.php +++ b/admin/stats/tr_stats.php @@ -31,7 +31,8 @@ echo ''; echo '

'; foreach ($sql as $i => $query) { - $row = mysqli_fetch_row(DB()->query($query))[0]; + $result = DB()->fetch_row($query); + $row = array_values($result)[0]; // Get first column value $row = ($i == 2) ? humn_size($row) : $row; echo ""; }
{$lang['TR_STATS'][$i]}$row