summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-06-28 19:51:02 +0000
committerDries Buytaert <dries@buytaert.net>2008-06-28 19:51:02 +0000
commit3c81924d7edf55efdda261dd401245e43e87096c (patch)
tree9185f7b2f17f445fccbd2c82ce6fce8487e80f04
parent6fca076eadd2d678f7e0024ba512ee9863c6eef6 (diff)
downloadbrdo-3c81924d7edf55efdda261dd401245e43e87096c.tar.gz
brdo-3c81924d7edf55efdda261dd401245e43e87096c.tar.bz2
- Patch #180646 by John Morahan: SQL in taxonomy_get_term_by_name() should use = instead of LIKE.
-rw-r--r--modules/taxonomy/taxonomy.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 7aa096217..c49625046 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -953,7 +953,7 @@ function _taxonomy_term_children($tid) {
* An array of matching term objects.
*/
function taxonomy_get_term_by_name($name) {
- $db_result = db_query(db_rewrite_sql("SELECT t.tid, t.* FROM {term_data} t WHERE LOWER(t.name) LIKE LOWER('%s')", 't', 'tid'), trim($name));
+ $db_result = db_query(db_rewrite_sql("SELECT t.tid, t.* FROM {term_data} t WHERE LOWER(t.name) = LOWER('%s')", 't', 'tid'), trim($name));
$result = array();
while ($term = db_fetch_object($db_result)) {
$result[] = $term;