aboutsummaryrefslogtreecommitdiff
path: root/jquery_drawer.module
diff options
context:
space:
mode:
Diffstat (limited to 'jquery_drawer.module')
-rw-r--r--jquery_drawer.module9
1 files changed, 6 insertions, 3 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module
index c0481e0..289168a 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -207,9 +207,12 @@ function jquery_drawer_get_children($tid = NULL) {
if (isset($filter) && !empty($filter)) {
// Then render all nodes whose terms are children of $term
- $query = 'SELECT DISTINCT n.nid, n.title, term_node.tid FROM {node} n LEFT JOIN
- {term_node} ON term_node.nid = n.nid WHERE term_node.tid IN (%s)
- AND n.status = "1" ORDER BY term_node.weight_in_tid ASC';
+ $query = 'SELECT DISTINCT n.nid, n.title, term_node.tid, term_node.weight_in_tid
+ FROM {node} n
+ LEFT JOIN {term_node} ON term_node.nid = n.nid
+ WHERE term_node.tid IN (%s)
+ AND n.status = "1"
+ ORDER BY term_node.weight_in_tid ASC';
//$query = db_rewrite_sql($query);
$nodes = db_query(db_rewrite_sql($query), implode(',', $filter));