Changeset 1542
- Timestamp:
- 08/23/06 22:39:49 (2 years ago)
- Location:
- trunk/gregarius/admin
- Files:
-
- 2 modified
-
channels.php (modified) (3 diffs)
-
items.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/admin/channels.php
r1537 r1542 98 98 $sql = "select " 99 99 ." c.id, c.title, c.url, c.siteurl, d.name, c.descr, c.parent, c.icon, c.mode, c.daterefreshed " 100 ." from " .getTable("channels") ." c, " . getTable("folders") ." d " 101 ." where d.id = c.parent "; 100 ." from " .getTable("channels") ." c " 101 ." inner join " . getTable("folders") ." d " 102 ." on d.id = c.parent "; 102 103 103 104 if (getConfig('rss.config.absoluteordering')) { … … 123 124 // get feed's tags 124 125 $tags = ""; 125 $sql2 = "select t.id, t.tag from " . getTable('tag') . " t, " 126 . getTable('metatag') . " m where t.id = m.tid " 127 . "and m.ttype = 'channel' and m.fid = $id"; 126 $sql2 = "select t.id, t.tag from " . getTable('tag') . " t " 127 . "inner join " . getTable('metatag') . " m " 128 . " on m.tid = t.id " 129 . "where m.ttype = 'channel' and m.fid = $id"; 128 130 $res2 = rss_query($sql2); 129 131 … … 751 753 list ($id, $title, $url, $siteurl, $parent, $descr, $icon, $mode, $daterefreshed, $dateadded) = rss_fetch_row($res); 752 754 // get tags 753 $sql = "select t.tag from " . getTable('tag')." t, " . getTable('metatag') 754 . " m where t.id = m.tid and m.ttype = 'channel' and m.fid = $cid"; 755 $sql = "select t.tag from " . getTable('tag')." t " 756 . " inner join " . getTable('metatag') . " m " 757 . " on m.tid = t.id " 758 . "where m.ttype = 'channel' and m.fid = $cid"; 755 759 $res = rss_query($sql); 756 760 $tags = ""; -
trunk/gregarius/admin/items.php
r1528 r1542 96 96 break; 97 97 } 98 $sql = " from ".getTable('item') ." i INNER JOIN " .getTable('channels') . " c ONc.id=i.cid "98 $sql = " from ".getTable('item') ." i inner join " .getTable('channels') . " c on c.id=i.cid " 99 99 ." where 1=1 "; 100 100 … … 131 131 } 132 132 133 $tsql = " select distinct fid from ". getTable('metatag') . " m, " 134 . getTable('tag') . " t" 135 ." where m.tid=t.id and t.tag in ('" 133 $tsql = " select distinct fid from ". getTable('metatag') . " m " 134 . " inner join " . getTable('tag') . " t" 135 . " on t.id = m.tid " 136 . " where t.tag in ('" 136 137 . implode("', '", $trimmed_exclude_tags) ."')"; 137 138 } … … 151 152 //delete the tags for these items 152 153 $sqlids = "select distinct i.id,i.cid " . $sql 153 . " and i.cid=c.idorder by i.cid, i.id desc";154 . " order by i.cid, i.id desc"; 154 155 155 156
