daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jan 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $Sql="SELECT *, (3959 * acos(cos(radians(37)) * cos(radians(44)) * cos(radians(55) -    radians(-122)) + sin(radians(37)) * sin(radians(44))) as distance FROM TableName       HAVING distance < 25 ORDER BY distance LIMIT 0 , 20";
  3. $result=mysql_query($Sql);
  4.  
  5. while ($row = mysql_fetch_array($result)){
  6.    echo $row['Id'];
  7. }
  8.    
  9. SELECT *, (
  10.         3959 * acos(
  11.                  cos(radians(37)) * cos(radians(44)) *
  12.                  cos(radians(55) -  radians(-122)) +
  13.                  sin(radians(37)) * sin(radians(44))
  14.                 )
  15.        )
  16.     as distance FROM TableName HAVING distance < 25 ORDER BY distance LIMIT 0 , 20
  17.    
  18. (3959 * acos(cos(radians(37)) * cos(radians(44)) * cos(radians(55) -    radians(-122)) + sin(radians(37)) * sin(radians(44))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top