Index: autotag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autotag/autotag.module,v
retrieving revision 1.3
diff -u -r1.3 autotag.module
--- autotag.module	12 Jun 2008 15:58:42 -0000	1.3
+++ autotag.module	12 Jun 2008 16:05:17 -0000
@@ -493,7 +493,7 @@
     }
     if(count($sql_array)){
       // FIXME FIXME FIXME
-      $results = db_query("SELECT t.tid FROM {term_data} t LEFT JOIN term_synonym s ON s.tid = t.tid WHERE ".implode(" OR ",$sql_array));
+      $results = db_query("SELECT t.tid FROM {term_data} t LEFT JOIN {term_synonym} s ON s.tid = t.tid WHERE ".implode(" OR ",$sql_array));
       while($row=db_fetch_array($results)){
         // Get the full term name, and its synonyms, and check back against the field
         $results_2 = db_query("SELECT tid,vid,LOWER(name) AS name FROM {term_data} WHERE tid = %d UNION SELECT s.tid,vid,LOWER(s.name) AS name FROM {term_synonym} s,term_data t WHERE s.tid = %d AND t.tid=s.tid",$row['tid'],$row['tid']);
