2
0
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:
Mohammad Shokri 2013-09-28 13:23:10 +03:30
parent defc59e110
commit 9daf3766a4

View File

@ -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);