Skip to content

Instantly share code, notes, and snippets.

@dynamiccarrots
Created November 1, 2017 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dynamiccarrots/9b9a045e562f3bcf825decbd39398126 to your computer and use it in GitHub Desktop.
Save dynamiccarrots/9b9a045e562f3bcf825decbd39398126 to your computer and use it in GitHub Desktop.
select *, ` ( 3959 * acos( cos( radians('50`.`866431018898') ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians('-1`.`4385519869239') ) + sin( radians('50`.`866431018898') ) * sin( radians(latitude) ) ) )` as `distance` from `adverts` where `active` = ? and (`title` like ?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment