move sql around a bit, so it's done in the same way in the entire class
add support for getTriggeredBatches in mfpakDAO