Function Reference: geodir_get_neighbourhoods

Summary

Get neighbourhoods for the given location ID.

Global Values

$wpdb
(object) (required) WordPress Database object.

Default: None

Package

GeoDirectory_Location_Manager

Parameters

$location
(string|int) (required) Location ID.

Default: None

Return Values

(bool|mixed)

    Change Log

    Since: 1.0.0

    Source File

    geodir_get_neighbourhoods() is located in geodir_location_manager/geodir_location_functions.php [Line: 1697]

    Source Code

    function geodir_get_neighbourhoods($location = '')
    {
    
    	global $wpdb;
    
    	$neighbourhoods = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".POST_NEIGHBOURHOOD_TABLE." WHERE hood_location_id = %d ORDER BY hood_name ", array($location)));
    
    	return (!empty($neighbourhoods)) ?  $neighbourhoods : false;
    
    }