aboutsummaryrefslogtreecommitdiff
path: root/app/Models/FeedDAOSQLite.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-07 21:12:13 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-07 21:12:13 +0200
commite358c5e2e1f39ebc2b580fdd31f085d3423e9401 (patch)
treefabf447ba1b62bfe869f16dcc4182daff5904e67 /app/Models/FeedDAOSQLite.php
parent439a0e2991231db51232646736a4bf78cfb2bffd (diff)
SQL: SQLite syntax uniformisation
https://github.com/marienfressinaud/FreshRSS/commit/805c91da98c2f582e279f3c853fba9e43f572419#diff-101042bec0ff3ac9d691b2e77fca3313R7
Diffstat (limited to 'app/Models/FeedDAOSQLite.php')
-rw-r--r--app/Models/FeedDAOSQLite.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Models/FeedDAOSQLite.php b/app/Models/FeedDAOSQLite.php
index bb75c860b..0d1872389 100644
--- a/app/Models/FeedDAOSQLite.php
+++ b/app/Models/FeedDAOSQLite.php
@@ -4,8 +4,8 @@ class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO {
public function updateCachedValues() { //For one single feed, call updateLastUpdate($id)
$sql = 'UPDATE `' . $this->prefix . 'feed` '
- . 'SET cache_nbEntries=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=feed.id),'
- . 'cache_nbUnreads=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=feed.id AND e2.is_read=0)';
+ . 'SET cache_nbEntries=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=`' . $this->prefix . 'feed`.id),'
+ . 'cache_nbUnreads=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=`' . $this->prefix . 'feed`.id AND e2.is_read=0)';
$stm = $this->bd->prepare($sql);
if ($stm && $stm->execute()) {
return $stm->rowCount();