Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 42412)
+++ trunk/ippTools/src/pzgetexp.c	(revision 42920)
@@ -75,4 +75,5 @@
 
     //optional
+    PXOPT_LOOKUP_STR(fromThisFileSet, config->args, "-last-fileset", false, false);
     PXOPT_LOOKUP_S32(timeout, config->args, "-timeout", false, false);
     PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
@@ -82,7 +83,11 @@
     bool haveLastFileSet = false;
     psString lastFileSet = NULL;
+    if (fromThisFileSet) {
+      haveLastFileSet = true;
+      lastFileSet = psStringCopy (lastFileSet);
+    }
 
     // -all means "request all known filesets"
-    if (!all) {
+    if (!lastFileSet && !all) {
         char *query = "SELECT * from summitExp WHERE camera = \"%s\" and TELESCOPE = \"%s\" ORDER BY dateobs DESC LIMIT 1";
         if (!p_psDBRunQueryF(config->dbh, query, camera, telescope)) {
@@ -181,6 +186,5 @@
     }
 
-    // XXX for test, make this not a temporary table:
-    // create a temporry table
+    // create a temporary table
     {
         char *query = "CREATE TEMPORARY TABLE incoming" 
