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.
This commit is contained in:
Yury Pikhtarev 2025-06-21 03:24:20 +04:00
commit c4a482c639
No known key found for this signature in database

View file

@ -31,7 +31,8 @@ echo '<html><body><head></head>';
echo '<br /><br /><table border="1" cellspacing="0" cellpadding="6" align="center">';
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 "<tr><td>{$lang['TR_STATS'][$i]}</td><td><b>$row</b></td>";
}