Function Reference: get_post_location_countries
Summary
Get countries from post location table.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
Package
GeoDirectory_Location_Manager
Return Values
- (array)
- Countries array.
Change Log
Since: 1.0.0
Source File
get_post_location_countries() is located in geodir_location_manager/geodir_location_functions.php [Line: 2566]
Source Code
function get_post_location_countries() { global $wpdb; $sql = "SELECT country, country_slug, count(location_id) AS total FROM " . POST_LOCATION_TABLE . " WHERE country_slug != '' && country != '' GROUP BY country_slug ORDER BY country ASC"; $rows = $wpdb->get_results( $sql ); return $rows; }