Retrieve the units for given map bounds and a date from a mysql database