Database Reference
In-Depth Information
Figure 8-16. Searching for Locations within a certain distance of User location
Listing 8-41. The locations_within_distance Method in the Location Class
public static function locationsWithinDistance($lq,$mappedUserLocation,$locationType){
$queryString = " START n = node:geom({lq}) WHERE n.type = {locationType} " .
" RETURN n.locationId as locationId, n.address as address, n.city as city, " .
" n.state as state, n.zip as zip, n.name as name, n.lat as lat, n.lon as lon";
$query = new Everyman\Neo4j\Cypher\Query(Neo4Client::client(), $queryString, array(
'lq' => $lq,
'locationType' => $locationType
));
$result = $query->getResultSet();
foreach($result as $row){
 
Search WWH ::




Custom Search