function _weather_es_cities in Weather_es 6.2
Same name and namespace in other branches
- 5 weather_es_parser.inc \_weather_es_cities()
- 6.3 weather_es.module \_weather_es_cities()
- 6 weather_es_parser.inc \_weather_es_cities()
- 7 weather_es.module \_weather_es_cities()
Available cities.
2 calls to _weather_es_cities()
- weather_es_configuration_form in ./
weather_es.module - Show a configuration page for a custom weather_es block
- weather_es_configuration_form_submit in ./
weather_es.module - Handle the submission of the custom weather_es block.
File
- ./
weather_es_parser.inc, line 419 - 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;
}