mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Add table_prefix to registered_users query
This commit is contained in:
parent
defc59e110
commit
9daf3766a4
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ function get_online_registered_users(&$dbh = NULL, $active_interval = 900) {
|
||||||
|
|
||||||
$table_prefix = getenv('table_prefix');
|
$table_prefix = getenv('table_prefix');
|
||||||
|
|
||||||
$sql = "SELECT COUNT(DISTINCT(uid)) AS count FROM sessions WHERE uid != 0
|
$sql = "SELECT COUNT(DISTINCT(uid)) AS count FROM {$table_prefix}sessions WHERE uid != 0
|
||||||
AND timestamp >= (UNIX_TIMESTAMP(now()) - ?)";
|
AND timestamp >= (UNIX_TIMESTAMP(now()) - ?)";
|
||||||
$stmt = $dbh->prepare($sql);
|
$stmt = $dbh->prepare($sql);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue