Commit 74d614c9 authored by Dries's avatar Dries
Browse files

- Patch #22264 by patryk: made a SQL query PostgreSQL compliant. Thanks Patryk.

parent 39d0fe9a
......@@ -252,7 +252,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 FROM {accesslog} GROUP BY path";
$sql = "SELECT COUNT(path) AS hits, path, title FROM {accesslog} GROUP BY path, title";
$sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
$header = array(
......
......@@ -252,7 +252,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 FROM {accesslog} GROUP BY path";
$sql = "SELECT COUNT(path) AS hits, path, title FROM {accesslog} GROUP BY path, title";
$sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
$header = array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment