--- tw_tablebuild.inc	(revision 607)
+++ tw_tablebuild.inc	(working copy)
@@ -40,7 +40,7 @@
   if (!is_null($twtids)) {
     // If a specific subset of tables are requested, add the appropriate
     // constraining WHERE clause
-    $sql .= ' AND twtid IN (' . db_placeholders($twtids) . ')';
+    $sql .= ' WHERE twtid IN (' . db_placeholders($twtids) . ')';
     $tblresult = db_query($sql, $twtids);
   }
   else {
