aboutsummaryrefslogtreecommitdiff
path: root/app/Models/StatsDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-08-02 22:49:35 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-08-02 22:49:35 +0200
commit7c1b5e322cca0134f57b3a436129985ba9170b9f (patch)
tree48e17355367549337a9bb2ba00237a5dbec2e240 /app/Models/StatsDAO.php
parent4a516aef583f4292293026ebc1d1a3984b75b4e8 (diff)
PostgreSQL draft
https://github.com/FreshRSS/FreshRSS/issues/416 Based on @Damstre work https://github.com/FreshRSS/FreshRSS/pull/1071 Not tested
Diffstat (limited to 'app/Models/StatsDAO.php')
-rw-r--r--app/Models/StatsDAO.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php
index 5ca333396..e18ba4748 100644
--- a/app/Models/StatsDAO.php
+++ b/app/Models/StatsDAO.php
@@ -37,10 +37,10 @@ class FreshRSS_StatsDAO extends Minz_ModelPdo {
$filter .= "AND e.id_feed = {$feed}";
}
$sql = <<<SQL
-SELECT COUNT(1) AS `total`,
-COUNT(1) - SUM(e.is_read) AS `unread`,
-SUM(e.is_read) AS `read`,
-SUM(e.is_favorite) AS `favorite`
+SELECT COUNT(1) AS total,
+COUNT(1) - SUM(e.is_read) AS unread,
+SUM(e.is_read) AS read,
+SUM(e.is_favorite) AS favorite
FROM {$this->prefix}entry AS e
, {$this->prefix}feed AS f
WHERE e.id_feed = f.id