Show
Ignore:
Timestamp:
08/24/06 01:14:02 (4 years ago)
Author:
cfriesen
Message:

Feel free to scream if this breaks something...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/categories.php

    r1519 r1544  
    109109            //get unread count per folder 
    110110            $sql = "select m.tid, t.tag, count(*) as cnt " 
    111             ." from " 
    112             .getTable('item') ." i, " 
    113             .getTable('channels') . " c, " 
    114             .getTable('metatag') ." m, " 
    115             .getTable('tag') . " t" 
     111            ." from " . getTable('item') ." i " 
     112            ." inner join " . getTable('channels') . " c on c.id = i.cid " 
     113            ." inner join " . getTable('metatag') ." m on m.fid = c.id " 
     114            ." inner join " . getTable('tag') . " t on t.id = m.tid " 
    116115            ." where i.unread & ". RSS_MODE_UNREAD_STATE 
    117116            ." and not(i.unread & ". RSS_MODE_DELETED_STATE .")"; 
     
    120119            } 
    121120            $sql .= " and not(c.mode & " . RSS_MODE_DELETED_STATE .") "; 
    122             $sql .= " and i.cid=c.id and c.id=m.fid and m.tid=t.id" 
    123121            ." group by m.tid"; 
    124122            _pf('query'); 
     
    142140        $sql = "select " 
    143141         ." c.id, c.title, c.url, c.siteurl, t.tag, c.parent, c.icon, c.descr, c.mode, t.id " 
    144          ." from " 
    145          .getTable('channels') ." c, " 
    146          .getTable('metatag') ." m, " 
    147          .getTable('tag') . " t " 
    148          ." where m.fid = c.id and m.ttype = 'channel' " 
    149          ." and m.tid = t.id "; 
    150  
     142         ." from " . getTable('channels') ." c " 
     143         ." inner join " . getTable('metatag') ." m m.fid = c.id " 
     144         ." inner join " . getTable('tag') . " t on t.id = m.tid " 
     145         ." where m.ttype = 'channel' " 
    151146 
    152147        if (hidePrivate()) {