This file contains hidden or 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
DELIMITER // | |
/* | |
Exemple : | |
You have table city with latitude and longitude column. | |
get_distance_meters(my_latitude, my_longitude, city.latitude, city.longitude) | |
return the distance in km | |
*/ | |
CREATE FUNCTION get_distance_meters ( lat1 FLOAT, lon1 FLOAT, lat2 FLOAT, lon2 FLOAT ) RETURNS DOUBLE PRECISION | |
BEGIN |
NewerOlder