Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.354
diff -u -p -r1.354 taxonomy.module
--- modules/taxonomy/taxonomy.module	4 May 2007 08:38:34 -0000	1.354
+++ modules/taxonomy/taxonomy.module	14 May 2007 05:13:35 -0000
@@ -1125,6 +1125,22 @@ function taxonomy_get_term_by_name($name
 }
 
 /**
+ * Returns the term ID for the given term name.
+ *
+ * NOTE: If more than one match is found, this function will return the first
+ * one it finds. If you have duplicate term names in your database, you may
+ * wish to use the more robust taxonomy_get_term_by_name() instead.
+ *
+ * @param $name
+ *   Name of the term to search for.
+ * @return
+ *   The term ID of the given term, or FALSE if none was found.
+ */
+function taxonomy_get_tid_by_name($name) {
+  return db_result(db_query(db_rewrite_sql('SELECT t.tid FROM {term_data} t WHERE LOWER('%s') LIKE LOWER(t.name)", 't', 'tid'), trim($name)));
+}
+
+/**
  * Return the vocabulary object matching a vocabulary ID.
  *
  * @param $vid
