geo/geo.inc, line 155
- Versions
- 6
geo_query_distance($field, $srid = null, $target)
Code
<?php
function geo_query_distance($field, $srid = null, $target) {
$target = "GeomFromText('POINT(". $target['lon'] .','. $target['lat'] .")')";
return 'Distance('. $field .', '. $target .')';
}
?> 