Index: trunk/ippToPsps/jython/stackbatch.py
===================================================================
--- trunk/ippToPsps/jython/stackbatch.py	(revision 38995)
+++ trunk/ippToPsps/jython/stackbatch.py	(revision 38999)
@@ -1423,7 +1423,12 @@
             
             ## output table names need to have "filter" prepended.  
-            ## add this as an option
-            self.scratchDb.loadFITStoMYSQL(fileName, "-tableprefix " + filter)
-            ## XXX table = stilts.tpipe(table, cmd='addcol table_index $0')
+            fitsOptions  = "-tableprefix " + filter
+
+            # this pair of options is equivalent to the stilts "addcol table_index $0" call
+            fitsOptions += " -sequence-column table_index"
+            fitsOptions += " -sequence-column-start 1"
+
+            ## *** actually write the FITS data to mysql
+            self.scratchDb.loadFITStoMYSQL(fileName, fitsOptions)
 
             # get the list of tables in this file:
