]> git.wh0rd.org Git - tt-rss.git/commitdiff
getCategoryCounters: fix broken psql syntax
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 16:52:39 +0000 (17:52 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 16:52:39 +0000 (17:52 +0100)
functions.php

index c84a7a7bf607563355dff0b8badbb8750260772a..ebd3cff1ada2dcf36c10252c99d6c23a75127068 100644 (file)
 
                $age_qpart = getMaxAgeSubquery();
 
-               $result = db_query($link, "SELECT cat_id, value AS unread
-                       FROM ttrss_feeds, ttrss_cat_counters_cache
-                       WHERE 
-                               ttrss_cat_counters_cache.feed_id = cat_id AND
-                               hidden = false AND 
-                               ttrss_feeds.owner_uid = ".$_SESSION["uid"]);
+               $result = db_query($link, "SELECT id AS cat_id, value AS unread 
+                       FROM ttrss_feed_categories, ttrss_cat_counters_cache 
+                       WHERE ttrss_cat_counters_cache.feed_id = id AND 
+                       ttrss_feed_categories.owner_uid = " . $_SESSION["uid"]);
 
                while ($line = db_fetch_assoc($result)) {
                        $line["cat_id"] = sprintf("%d", $line["cat_id"]);