function weather_update_6505 in Weather 6.5
Implementation of hook_update_N().
Insert some cities in North and South Carolina.
File
- ./
weather.install, line 618 - Database installation of weather module.
Code
function weather_update_6505() {
$ret = array();
// Change city name
$sql = "UPDATE {weather_icao} SET name='NC - Southport' WHERE icao='KSUT'";
$ret[] = update_sql($sql);
// Insert cities
$sql = "INSERT INTO {weather_icao} (icao, country, name, latitude, longitude)\n VALUES ('KHYW', 'United States of America', 'SC - Conway - Horry County', 33.828488, -79.122176)";
$ret[] = update_sql($sql);
$sql = "INSERT INTO {weather_icao} (icao, country, name, latitude, longitude)\n VALUES ('KGGE', 'United States of America', 'SC - Georgetown', 33.311694, -79.319583)";
$ret[] = update_sql($sql);
$sql = "INSERT INTO {weather_icao} (icao, country, name, latitude, longitude)\n VALUES ('KCKI', 'United States of America', 'SC - Kingstree', 33.717222, -79.856972)";
$ret[] = update_sql($sql);
$sql = "INSERT INTO {weather_icao} (icao, country, name, latitude, longitude)\n VALUES ('KMNI', 'United States of America', 'SC - Manning', 33.587111, -80.208667)";
$ret[] = update_sql($sql);
$sql = "INSERT INTO {weather_icao} (icao, country, name, latitude, longitude)\n VALUES ('KMAO', 'United States of America', 'SC - Marion', 34.181167, -79.334722)";
$ret[] = update_sql($sql);
return $ret;
}