Show
Ignore:
Timestamp:
08/23/06 22:39:49 (2 years ago)
Author:
cfriesen
Message:

Some SQL modifications. Hope this doesn't mess anything up..

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/admin/channels.php

    r1537 r1542  
    9898    $sql = "select " 
    9999           ." 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 "; 
    102103 
    103104    if (getConfig('rss.config.absoluteordering')) { 
     
    123124        // get feed's tags 
    124125        $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"; 
    128130        $res2 = rss_query($sql2); 
    129131 
     
    751753    list ($id, $title, $url, $siteurl, $parent, $descr, $icon, $mode, $daterefreshed, $dateadded) = rss_fetch_row($res); 
    752754    // 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"; 
    755759    $res = rss_query($sql); 
    756760    $tags = "";