mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Add table_prefix to registered_users query
This commit is contained in:
parent
defc59e110
commit
9daf3766a4
@ -114,7 +114,7 @@ function get_online_registered_users(&$dbh = NULL, $active_interval = 900) {
|
||||
|
||||
$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()) - ?)";
|
||||
$stmt = $dbh->prepare($sql);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user