/[drupal]/contributions/modules/related_terms/related_terms.module
ViewVC logotype

Diff of /contributions/modules/related_terms/related_terms.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.1, Mon Jan 19 15:12:59 2009 UTC revision 1.1.4.2, Sun Aug 16 07:05:49 2009 UTC
# Line 126  function related_terms_get_related_terms Line 126  function related_terms_get_related_terms
126      $restrict_vids = ' AND td2.vid IN (' . implode(',',$vids) . ') ';      $restrict_vids = ' AND td2.vid IN (' . implode(',',$vids) . ') ';
127    }    }
128    
129    $sql = "SELECT tn2.tid, td2.name, COUNT(tn.nid) AS cnt FROM term_node tn INNER JOIN term_node tn2 ON tn2.nid = tn.nid INNER JOIN term_data td ON td.tid = tn.tid INNER JOIN term_data td2 ON td2.tid = tn2.tid WHERE (tn.tid = %d) AND tn2.tid <> %d ".$restrict_vids." GROUP BY tn.tid, tn2.tid ORDER BY cnt";    $sql = "SELECT tn2.tid, td2.name, COUNT(tn.nid) AS cnt FROM term_node tn INNER JOIN term_node tn2 ON tn2.nid = tn.nid INNER JOIN term_data td ON td.tid = tn.tid INNER JOIN term_data td2 ON td2.tid = tn2.tid WHERE (tn.tid = %d) AND tn2.tid <> %d ".$restrict_vids." GROUP BY tn.tid, tn2.tid ORDER BY cnt DESC";
130    
131    if($limit <= 0) {    if($limit <= 0) {
132      $result = db_query($sql, $tid, $tid);      $result = db_query($sql, $tid, $tid);

Legend:
Removed from v.1.1.4.1  
changed lines
  Added in v.1.1.4.2

  ViewVC Help
Powered by ViewVC 1.1.2