mysql/core_cities_merge.sql
authorEdward <edward@roojs.com>
Thu, 26 Jun 2014 10:22:53 +0000 (18:22 +0800)
committerEdward <edward@roojs.com>
Thu, 26 Jun 2014 10:22:53 +0000 (18:22 +0800)
mysql/core_cities_merge.sql

index 4c21f42..9075099 100644 (file)
@@ -271,6 +271,9 @@ CREATE FUNCTION core_country_locations()  RETURNS INT DETERMINISTIC
             IF (v_continent_code != '') THEN
                 SELECT id INTO v_continent_id FROM core_geoip_continent WHERE code = v_continent_code;
 
+                IF v_continent_id = 0 THEN
+                    INSERT INTO core_geoip_continent (code, name) VALUES (v_continent_code, v_continent_name);
+                END IF;
                 
             END IF;