From 09bd156ba212f56cc62de85c53f14127c719522b Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Wed, 19 Jan 2005 01:46:25 +0000 Subject: - Fix tracker pager count query being wrong (it did not return a count but a set, and it counted nodes with more than 1 comment as multiple nodes). - Clean up various SQL queries: removing literally inserted data (db_escape_string is evil!), fixing single "%" which should be "%%", fixing integers being compared as strings. --- modules/taxonomy/taxonomy.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index ada11cbe3..b78ce043d 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -834,7 +834,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p $wheres .= ' AND tn'. $index .'.tid IN ('. implode(',', $tids) .')'; } $sql = 'SELECT n.nid, n.sticky, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; - $sql_count = 'SELECT COUNT(n.nid) FROM {node} n ' . $joins .' WHERE n.status = 1 ' . $wheres; + $sql_count = 'SELECT COUNT(n.nid) FROM {node} n '. $joins .' WHERE n.status = 1 ' . $wheres; } $sql = node_rewrite_sql($sql); $sql_count = node_rewrite_sql($sql_count); -- cgit v1.2.3