Fix getActiveUsersWithinDays() to use the correct date functions so we get
the correct number of users active.
This commit is contained in:
@@ -423,7 +423,7 @@ function getNumberOfUsers()
|
|||||||
/* Get the number of active users within $days of the current day */
|
/* Get the number of active users within $days of the current day */
|
||||||
function getActiveUsersWithinDays($days)
|
function getActiveUsersWithinDays($days)
|
||||||
{
|
{
|
||||||
$result = mysql_query("SELECT count(*) as num_users FROM user_list WHERE stamp >= 'NOW() - $days';");
|
$result = mysql_query("SELECT count(*) as num_users FROM user_list WHERE stamp >= DATE_SUB(CURDATE(), interval $days day);");
|
||||||
$row = mysql_fetch_object($result);
|
$row = mysql_fetch_object($result);
|
||||||
return $row->num_users;
|
return $row->num_users;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user