summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-16 17:52:39 +0100
committerAndrew Dolgov <[email protected]>2009-01-16 17:52:39 +0100
commit31375163f16b17b13d3c6992ed9b4ddc4e214459 (patch)
treedf1f24928910b080b893e416f2b9210f9c48b2fd /functions.php
parent74dc6d85c8b35e5ac13164e5132461a31839596a (diff)
getCategoryCounters: fix broken psql syntax
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/functions.php b/functions.php
index c84a7a7bf..ebd3cff1a 100644
--- a/functions.php
+++ b/functions.php
@@ -2330,12 +2330,10 @@
$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"]);