end
end
- def self.sql_for_area(minlat, minlon, maxlat, maxlon)
+ def self.sql_for_area(minlat, minlon, maxlat, maxlon, prefix)
sql = Array.new
single = Array.new
if first == last
single.push(first)
else
- sql.push("tile BETWEEN #{first} AND #{last}")
+ sql.push("#{prefix}tile BETWEEN #{first} AND #{last}")
end
end
- sql.push("tile IN (#{single.join(',')})") if single.size > 0
+ sql.push("#{prefix}tile IN (#{single.join(',')})") if single.size > 0
return "( " + sql.join(" OR ") + " )"
end