Re: Calculate the distance between 2 points [message #171284 is a reply to message #171279] |
Thu, 30 December 2010 01:23 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Sarah wrote:
> I know this
>
> $distanceValue =
> rad2deg(acos(sin(deg2rad($LATITUDINE1))*sin(deg2rad($LATITUDINE2))
>
+cos(deg2rad($LATITUDINE1))*cos(deg2rad($LATITUDINE2))*cos(deg2rad($LONGITU DINE1-
> $LONGITUDINE2))))*69.09;
>
> or something like this.... but I don't want to have all records of DB
> and than analize them one by one .... I want a query the return only
> nearest values
So RTFMySQLM.
PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
|
|
|