#48415 by nickl. Correct count query for Top visitors page.

5.x
Neil Drumm 2006-12-30 21:12:16 +00:00
parent 7d706a562d
commit 77176a8f64
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ function statistics_top_visitors() {
);
$sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, ac.aid FROM {accesslog} a LEFT JOIN {access} ac ON ac.type = 'host' AND LOWER(a.hostname) LIKE (ac.mask) LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, ac.aid". tablesort_sql($header);
$sql_cnt = "SELECT COUNT(DISTINCT(uid)) FROM {accesslog}";
$sql_cnt = "SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM {accesslog}";
$result = pager_query($sql, 30, 0, $sql_cnt);
while ($account = db_fetch_object($result)) {