mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:45:55 +00:00
ccache, misc: fixes
feeds: start PDO transition
This commit is contained in:
@@ -118,7 +118,8 @@ class CCache {
|
||||
|
||||
if (!$pcat_fast) {
|
||||
$sth = $pdo->prepare("SELECT id FROM ttrss_feeds
|
||||
WHERE owner_uid = :uid AND cat_id = :cat OR (:cat = 0 AND cat_id IS NULL)");
|
||||
WHERE owner_uid = :uid AND
|
||||
(cat_id = :cat OR (:cat = 0 AND cat_id IS NULL))");
|
||||
$sth->execute([":uid" => $owner_uid, ":cat" => $feed_id]);
|
||||
|
||||
while ($line = $sth->fetch()) {
|
||||
@@ -129,7 +130,7 @@ class CCache {
|
||||
$sth = $pdo->prepare("SELECT SUM(value) AS sv
|
||||
FROM ttrss_counters_cache, ttrss_feeds
|
||||
WHERE id = feed_id AND
|
||||
cat_id = :cat OR (:cat IS NULL AND cat_id IS NULL) AND
|
||||
(cat_id = :cat OR (:cat = 0 AND cat_id IS NULL)) AND
|
||||
ttrss_counters_cache.owner_uid = :uid AND
|
||||
ttrss_feeds.owner_uid = :uid");
|
||||
$sth->execute([":uid" => $owner_uid, ":cat" => $feed_id]);
|
||||
|
||||
Reference in New Issue
Block a user