summaryrefslogtreecommitdiff
path: root/modules/statistics
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-11-13 02:40:18 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-11-13 02:40:18 +0000
commite43ea3f9552e7efb2a8e31ec51711f1c5a13ba0b (patch)
tree18e6c8a99c35299490b53eb1b8f046164c02addb /modules/statistics
parent21bed11e668d0a526d35d0baab4606af64141b00 (diff)
downloadbrdo-e43ea3f9552e7efb2a8e31ec51711f1c5a13ba0b.tar.gz
brdo-e43ea3f9552e7efb2a8e31ec51711f1c5a13ba0b.tar.bz2
#36936 / #36937: PgSQL fixes for statistics
Diffstat (limited to 'modules/statistics')
-rw-r--r--modules/statistics/statistics.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 7a6990ffe..581147933 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -247,7 +247,7 @@ function statistics_recent_hits($type = 'all', $id = 0) {
* Menu callback; presents the "top pages" page.
*/
function statistics_top_pages() {
- $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path";
+ $sql = "SELECT COUNT(path) AS hits, path, title, AVG(timer) AS average_time, SUM(timer) AS total_time FROM {accesslog} GROUP BY path, title";
$sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
$header = array(
@@ -281,7 +281,7 @@ function statistics_top_visitors() {
array('data' => t('Operations'))
);
- $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". tablesort_sql($header);
+ $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}";
$result = pager_query($sql, 30, 0, $sql_cnt);