Changeset 1544 for trunk/gregarius/cls/channels.php
- Timestamp:
- 08/24/06 01:14:02 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/cls/channels.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/channels.php
r1539 r1544 169 169 170 170 _pf(' ... totalCount'); 171 $sql = 172 "select count(*) from ".getTable("item") . "i ," . getTable('channels') . " c "173 174 ." where i.cid=c.id andnot(i.unread & ".RSS_MODE_DELETED_STATE.") "175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")"171 $sql ="select count(*) from ".getTable("item") . "i " 172 ."inner join " . getTable('channels') . " c " 173 ." on c.id = i.cid " 174 ." where not(i.unread & ".RSS_MODE_DELETED_STATE.") " 175 ." and not (c.mode & " .RSS_MODE_DELETED_STATE.")" 176 176 . (hidePrivate()? " and not(unread & ".RSS_MODE_PRIVATE_STATE.")":""); 177 177 … … 218 218 //get unread count per folder 219 219 $sql = "select f.id, f.name, count(*) as cnt " 220 ." from " 221 .getTable('item') ." i, " 222 .getTable('channels') . " c, " 223 .getTable('folders') ." f " 220 ." from " .getTable('item') ." i " 221 ." inner join " . getTable('channels') . " c on c.id = i.cid " 222 ." inner join " . getTable('folders') ." f on f.id = c.parent " 224 223 ." where i.unread & ". RSS_MODE_UNREAD_STATE 225 224 ." and not(i.unread & ". RSS_MODE_DELETED_STATE .")"; … … 228 227 } 229 228 $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 230 $sql .= " and i.cid=c.id and c.parent=f.id " 231 ." group by f.id"; 229 $sql .= " group by f.id"; 232 230 _pf('query'); 233 231 $res = rss_query($sql); … … 249 247 function populate() { 250 248 _pf('FeedList->populate() ...'); 251 $sql = "select "." c.id, c.title, c.url, c.siteurl, f.name, c.parent, c.icon, c.descr, c.mode "." from ".getTable("channels")." c ,"252 . getTable("folders")." f "." wheref.id = c.parent";249 $sql = "select "." c.id, c.title, c.url, c.siteurl, f.name, c.parent, c.icon, c.descr, c.mode "." from ".getTable("channels")." c " 250 ."inner join " . getTable("folders")." f on f.id = c.parent"; 253 251 254 252 if (hidePrivate()) {
