1
0
Fork 0
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:
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'); $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);