You are here

function weather_get_countries in Weather 7

Same name and namespace in other branches
  1. 6.5 weather.module \weather_get_countries()
  2. 7.3 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 settings form for a weather location.

File

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

Code

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