(SELECT feed_url, site_url, title, subscribers FROM ttrss_feedbrowser_cache UNION ALL
SELECT feed_url, site_url, title, subscribers FROM ttrss_linked_feeds) AS qqq
WHERE
- (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
+ (SELECT COUNT(id) != 0 FROM ttrss_feeds AS tf
WHERE tf.feed_url = qqq.feed_url
- AND owner_uid = ?) $search_qpart
+ ) $search_qpart
GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT " . (int)$limit);
$sth->execute([$_SESSION['uid']]);