From c19718e809f66dc1148f93d87ad2f0b33c37cf3b Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 13 Jun 2016 18:17:46 -0300 Subject: Put ORDER BY field into SELECT list for MySQL 5.7 compatibility --- jquery_drawer.module | 9 ++++++--- 1 file 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)); -- cgit v1.2.3