- Patch #8176 by JonBob: fixed braino in SQL query.

4.5.x
Dries Buytaert 2004-08-12 22:16:01 +00:00
parent 5a566c55ec
commit a36304af0d
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}
/**

View File

@ -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));
}
/**