You are here

function _weather_es_cities in Weather_es 5

Same name and namespace in other branches
  1. 6.3 weather_es.module \_weather_es_cities()
  2. 6 weather_es_parser.inc \_weather_es_cities()
  3. 6.2 weather_es_parser.inc \_weather_es_cities()
  4. 7 weather_es.module \_weather_es_cities()

Available cities.

2 calls to _weather_es_cities()
weather_es_configuration in ./weather_es.module
Show a configuration page for a custom weather_es block
weather_es_configuration_submit in ./weather_es.module
Handle the submission of the custom weather_es block.

File

./weather_es_parser.inc, line 519
Gets the data from the AEMET web

Code

function _weather_es_cities($pro) {
  $sql = "SELECT * FROM {weather_es_aemet} wea WHERE wea.cod_pro = %d";
  $result = db_query($sql, $pro);
  while ($row = db_fetch_array($result)) {
    $aemet_cod = $row['cod_pro'] . $row['cod_loc'];
    $cities[$aemet_cod] = $row['cit_nam'];
  }
  return $cities;
}