From a36304af0d7a8e16a4f094e08533af35fa36b95a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 12 Aug 2004 22:16:01 +0000 Subject: - Patch #8176 by JonBob: fixed braino in SQL query. --- 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 079e936a1..519ada067 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -385,7 +385,7 @@ function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy') function taxonomy_node_has_term($nid, $tid) { $term_name = db_result(db_query('SELECT name FROM {term_data} WHERE tid = %d', $tid)); - return db_result(db_query("SELECT COUNT(n.nid) FROM {node} n WHERE n.nid = %d AND ((n.body LIKE '%%%s%%') OR (n.body LIKE '%%%s%%'))", $nid, $term_name, $term_name)); + return db_result(db_query("SELECT COUNT(n.nid) FROM {node} n WHERE n.nid = %d AND ((n.title LIKE '%%%s%%') OR (n.body LIKE '%%%s%%'))", $nid, $term_name, $term_name)); } /** -- cgit v1.2.3