From db42b934a1edbdcfc7e8b0274f9addaa62287c6e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 29 Dec 2005 07:19:27 +0100 Subject: counters for linked feeds, misc SQL optimizations --- functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index aececd8d9..11eb26796 100644 --- a/functions.php +++ b/functions.php @@ -245,12 +245,12 @@ $filters = array(); $result = db_query($link, "SELECT reg_exp, - (SELECT name FROM ttrss_filter_types - WHERE id = filter_type) as name, - (SELECT name FROM ttrss_filter_actions - WHERE id = action_id) as action - FROM ttrss_filters WHERE - owner_uid = $owner_uid AND + ttrss_filter_types.name AS name, + ttrss_filter_actions.name AS action + FROM ttrss_filters,ttrss_filter_types,ttrss_filter_actions WHERE + owner_uid = $owner_uid AND + ttrss_filter_types.id = filter_type AND + ttrss_filter_actions.id = action_id AND (feed_id IS NULL OR feed_id = '$feed')"); while ($line = db_fetch_assoc($result)) { -- cgit v1.2.3