Index: trunk/ippTools/src/camtool.c
===================================================================
--- trunk/ippTools/src/camtool.c	(revision 21433)
+++ trunk/ippTools/src/camtool.c	(revision 21443)
@@ -655,8 +655,7 @@
     }
 
-    // use psDBGenerateWhereConditionalSQL with AND ... because the SQL ends in a WHERE
     if (psListLength(where->list)) {
         psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
-        psStringAppend(&query, " AND %s", whereClause);
+        psStringAppend(&query, " WHERE %s", whereClause);
         psFree(whereClause);
     }
@@ -677,4 +676,7 @@
         psFree(limitString);
     }
+
+    // order by cam_id so that the postage stamp parser can easliy find the 'latest' astrometry
+    psStringAppend(&query, "\nORDER BY cam_id");
 
     if (!p_psDBRunQuery(config->dbh, query)) {
