aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2016-06-13 18:17:46 -0300
committerSilvio <silvio@socioambiental.org>2016-06-13 18:17:46 -0300
commitc19718e809f66dc1148f93d87ad2f0b33c37cf3b (patch)
tree9bcc72e20fde47c404ca8848d1b3f5c1a191f0da
parent4ac4b9abc82abeadd65130323e523fe03c31d42d (diff)
downloadjquery_drawer-master.tar.gz
jquery_drawer-master.tar.bz2
Put ORDER BY field into SELECT list for MySQL 5.7 compatibilityHEADmasterdevelop
-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));