--- d1/modules/statistics/statistics.module (revision 1032)
+++ d1/modules/statistics/statistics.module (working copy)
@@ -318,7 +318,7 @@
);
$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(CONCAT(cast uid as varchar), hostname))) 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)) {
Comments
Comment #1
dave reidDuplicate of #229051: Top Visitor Page problem with PostgreSQL 8.3.