Philip Hallstrom wrote:
> On Apr 16, 2009, at 10:21 PM, Milton Wong wrote:
> SELECT * FROM some_table WHERE
> (3960 * 2 * ASIN( SQRT( (1 - COS(RADIANS(latitude - #{latitude})))
> / 2 + COS(RADIANS(#{latitude}))
> * COS(RADIANS(latitude))
> * (1 - COS(RADIANS(longitude - #{longitude}))) / 2))) <= #{radius}Thanks Phillip, Michael. I tried the formula and it works! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

