Horje
php get closest location by latitude longitude Code Example
php get closest location by latitude longitude
SELECT * , (3956 * 2 * ASIN(SQRT( POWER(SIN(( $lat - LatOnTable) *  pi()/180 / 2), 2) +COS( $lat * pi()/180) * COS(LatOnTable * pi()/180) * POWER(SIN(( $long - LongOnTable) * pi()/180 / 2), 2) ))) as distance  
from yourTable  
having  distance <= 10 
order by distance




Sql

Related
use of undefined constant mysql_assoc - assumed Code Example use of undefined constant mysql_assoc - assumed Code Example
dns slave zone convert Code Example dns slave zone convert Code Example
INSERT INTO table using OpenQuery Code Example INSERT INTO table using OpenQuery Code Example
MySQL PARTITION BY month automatically Code Example MySQL PARTITION BY month automatically Code Example
sql delimiter to columns Code Example sql delimiter to columns Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8