This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Enter HostName:" | |
read host | |
echo "Enter DB Name:" | |
read dbname | |
echo "Enter Auth DB Name: (usually admin)" | |
read authdb | |
echo "Enter Username:" | |
read username | |
echo "Enter Password" | |
read password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT zip, primary_city, | |
latitude, longitude, distance | |
FROM ( | |
SELECT z.zip, | |
z.primary_city, | |
z.latitude, z.longitude, | |
p.radius, | |
p.distance_unit | |
* DEGREES(ACOS(COS(RADIANS(p.latpoint)) | |
* COS(RADIANS(z.latitude)) |