diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-12-30 21:12:16 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-12-30 21:12:16 +0000 |
commit | 77176a8f647b5db696c68528da3f9fd15786db61 (patch) | |
tree | 521177c97709ae1f53263444d742ef35dfcf435f /modules | |
parent | 7d706a562d48e89afb1cb44390cf9b9f848e8fe6 (diff) | |
download | brdo-77176a8f647b5db696c68528da3f9fd15786db61.tar.gz brdo-77176a8f647b5db696c68528da3f9fd15786db61.tar.bz2 |
#48415 by nickl. Correct count query for Top visitors page.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/statistics/statistics.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index af2bb35f3..aca21b6ad 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -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)) { |