diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/itemmapper.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db/itemmapper.php b/db/itemmapper.php index ca80b5b79..6033832a0 100644 --- a/db/itemmapper.php +++ b/db/itemmapper.php @@ -138,13 +138,14 @@ class ItemMapper extends NewsMapper { WHERE `a`.`feed_id` = ? AND `a`.`id` <= ? AND `a`.`fingerprint` = `b`.`fingerprint` - AND `b`.`feed_id` IN ( + AND EXISTS ( SELECT `id` FROM `*PREFIX*news_feeds` WHERE `user_id` = ? + AND `id` = ? ) )'; $params = [~StatusFlag::UNREAD, $time, $feedId, $highestItemId, - $userId]; + $userId, $feedId]; $this->execute($sql, $params); } |