You are here

function weather_get_countries in Weather 7.3

Same name and namespace in other branches
  1. 6.5 weather.module \weather_get_countries()
  2. 7 weather.forms.inc \weather_get_countries()
  3. 7.2 weather.forms.inc \weather_get_countries()

Get all countries.

Return value

array Array of sorted countries.

1 call to weather_get_countries()
weather_location_settings_form in ./weather.forms.inc
Create a form for a weather place.

File

./weather.forms.inc, line 773
Provide forms for configuration of weather displays.

Code

function weather_get_countries() {
  $result = db_query('SELECT country FROM {weather_places} GROUP BY country ORDER BY country ASC');
  foreach ($result as $row) {
    $countries[] = $row->country;
  }
  return $countries;
}