Index: linktocontent_node.module =================================================================== --- linktocontent_node.module (revision 127) +++ linktocontent_node.module (working copy) @@ -238,13 +238,19 @@ $term = taxonomy_get_term($tid); $tree = taxonomy_get_tree($term->vid, $tid, -1, 0); $descendant_tids[] = array_merge(array($tid), array_map('_taxonomy_get_tid_from_term', $tree)); - $str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids)); $join = 'INNER JOIN'; $where = 'tn.tid IN ('. $str_tids .')'; if ($tid < 0) { $join = 'LEFT JOIN'; - $where = 'ISNULL(tn.tid)'; + switch ($GLOBALS['db_type']) { + case 'mssql': + $where = 'tn.tid IS NULL'; + break; + default: + $where = 'ISNULL(tn.tid)'; + break; + } } $sql = 'SELECT DISTINCT(n.nid), n.type, n.title, n.created, n.changed, n.sticky, u.name, tn.tid FROM {node} n INNER JOIN {users} u ON u.uid = n.uid '; $sql .= $join .' {term_node} tn ON n.nid = tn.nid WHERE '. $where .' AND n.status = 1 ORDER BY '. $order; @@ -262,4 +268,4 @@ } } return $result; -} +} \ No newline at end of file