summaryrefslogtreecommitdiff
path: root/modules/taxonomy.module
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-05-24 04:54:52 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-05-24 04:54:52 +0000
commitd80a410bb0aca4656df75414c7d797b805586235 (patch)
tree89131abc41a2b983118da3ba8cd883686bfd4d04 /modules/taxonomy.module
parentd7f3ace21404e9961fc8e0afc967772123fc43a7 (diff)
downloadbrdo-d80a410bb0aca4656df75414c7d797b805586235.tar.gz
brdo-d80a410bb0aca4656df75414c7d797b805586235.tar.bz2
#64951 by deepstar, Ambiguous query in taxonomy_get_term_by_name()
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r--modules/taxonomy.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 2d3eb7c72..ba7827d70 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -997,7 +997,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('%s') LIKE LOWER(name)", 't', 'tid'), trim($name));
+ $db_result = db_query(db_rewrite_sql("SELECT t.tid, t.* FROM {term_data} t WHERE LOWER('%s') LIKE LOWER(t.name)", 't', 'tid'), trim($name));
$result = array();
while ($term = db_fetch_object($db_result)) {
$result[] = $term;