/[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, Wed Aug 6 11:54:39 2008 UTC revision 1.1.2.1, Sun Aug 16 07:06:23 2009 UTC
# Line 111  function related_terms_get_related_terms Line 111  function related_terms_get_related_terms
111      $restrict_vids = ' AND td2.vid IN (' . implode(',',$vids) . ') ';      $restrict_vids = ' AND td2.vid IN (' . implode(',',$vids) . ') ';
112    }    }
113    
114    $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";
115    
116    if($limit <= 0) {    if($limit <= 0) {
117      $result = db_query($sql, $tid, $tid);      $result = db_query($sql, $tid, $tid);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2