You are here

function weather_get_country_from_icao in Weather 7

Same name and namespace in other branches
  1. 6.5 weather.module \weather_get_country_from_icao()

Get the country of the ICAO code.

Parameters

string $wanted_icao: ICAO code.

Return value

string The country of the ICAO code or an empty string.

2 calls to weather_get_country_from_icao()
weather_get_location_settings in ./weather.module
Return location settings for a specific id.
weather_location_settings_form_validate in ./weather.forms.inc
Implement hook_form_validate().

File

./weather.module, line 531
Display current weather data from many places in the world.

Code

function weather_get_country_from_icao($wanted_icao) {
  return db_query('SELECT country FROM {weather_icao} WHERE icao=:icao', array(
    ':icao' => $wanted_icao,
  ))
    ->fetchField();
}