Used datastore to show statistic for more performance (#1309)

* Used datastore to show statistic for more performance

* Update admin_forums.php
This commit is contained in:
Roman Kelesidis 2024-01-06 14:07:27 +07:00 committed by GitHub
commit 6bf987edb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 46 deletions

View file

@ -20,7 +20,7 @@ $row = DB()->fetch_row("SELECT COUNT(*) AS usercount FROM " . BB_USERS . " WHERE
$data['usercount'] = commify($row['usercount']);
// newestuser
$row = DB()->fetch_row("SELECT user_id, username, user_rank FROM " . BB_USERS . " WHERE user_active = 1 ORDER BY user_id DESC LIMIT 1");
$row = DB()->fetch_row("SELECT user_id, username, user_rank FROM " . BB_USERS . " WHERE user_active = 1 AND user_id NOT IN(" . EXCLUDED_USERS . ") ORDER BY user_id DESC LIMIT 1");
$data['newestuser'] = $row;
// post/topic count