aboutsummaryrefslogtreecommitdiffstats
path: root/admin/stats.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-04 19:36:56 +0000
committernikrou <nikrou@piwigo.org>2010-06-04 19:36:56 +0000
commitfd0f465c59415c73bf6cf926a73804b32807c969 (patch)
tree36f75048d8b64de402a555961f542f187b929a53 /admin/stats.php
parent8a1f11a2942f9e20b39fd4ae53a37ee024d374cf (diff)
Fix bug 1717 : SQLite: access failure on Admin > Tools > History
hour function doesn't exists git-svn-id: http://piwigo.org/svn/trunk@6463 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/stats.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/stats.php b/admin/stats.php
index b693ebcaa..1ce07649a 100644
--- a/admin/stats.php
+++ b/admin/stats.php
@@ -116,14 +116,17 @@ check_status(ACCESS_ADMINISTRATOR);
$query = '
SELECT
date,
- HOUR(time) AS hour,
+ hour(time) AS hour,
MAX(id) AS max_id,
COUNT(*) AS nb_pages
FROM '.HISTORY_TABLE.'
WHERE summarized = \'false\'
GROUP BY
+ date,
+ hour
+ ORDER BY
date ASC,
- HOUR(time) ASC
+ hour ASC
;';
$result = pwg_query($query);