google maps and conditional sql