diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-08-12 22:16:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-08-12 22:16:01 +0000 |
commit | a36304af0d7a8e16a4f094e08533af35fa36b95a (patch) | |
tree | e27025a112f19bc3837a258fdb260ae50575dbbb | |
parent | 5a566c55ec162b863843fa8b488273d31565718e (diff) | |
download | brdo-a36304af0d7a8e16a4f094e08533af35fa36b95a.tar.gz brdo-a36304af0d7a8e16a4f094e08533af35fa36b95a.tar.bz2 |
- Patch #8176 by JonBob: fixed braino in SQL query.
-rw-r--r-- | modules/taxonomy.module | 2 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 079e936a1..519ada067 100644 --- a/modules/taxonomy.module +++ b/modules/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)); } /** 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)); } /** |