ensured select and from before firing query changed
 added value2 to support date range