added date validation #2
the order of the sql query change in order to fix #5
script is now able to query cities, zones, and regions close #4