]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix search query (closes #30)
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 6 Jan 2006 13:14:19 +0000 (14:14 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 6 Jan 2006 13:14:19 +0000 (14:14 +0100)
backend.php

index e0141d7c80dd6f6116ffb52eecffbeee01e2ce5d..2dba06efda7742059935e9682352388b38f743b7 100644 (file)
                $search_mode = db_escape_string($_GET["smode"]);
 
                if ($search) {
-                       $search_query_part = "(upper(title) LIKE upper('%$search%') 
-                               OR content LIKE '%$search%') AND";
+                       $search_query_part = "(upper(ttrss_entries.title) LIKE upper('%$search%') 
+                               OR ttrss_entries.content LIKE '%$search%') AND";
                } else {
                        $search_query_part = "";
                }
 
                // override query strategy and enable feed display when searching globally
                if ($search && $search_mode == "All feeds") {
-                       $query_strategy_part = "id > 0";
+                       $query_strategy_part = "ttrss_entries.id > 0";
                        $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
                } else if (sprintf("%d", $feed) == 0) {
                        $query_strategy_part = "ttrss_entries.id > 0";