#48415 by nickl. Correct count query for Top visitors page.
parent
7d706a562d
commit
77176a8f64
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue