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

index 3149e7c..4c21f42 100644 (file)
@@ -268,7 +268,13 @@ CREATE FUNCTION core_country_locations()  RETURNS INT DETERMINISTIC
             SET v_country_id = 0;
             SET v_continent_id = 0;
             
-            SELECT id INTO v_id_tmp FROM core_geoip_country WHERE code = v_iso;
+            IF (v_continent_code != '') THEN
+                SELECT id INTO v_continent_id FROM core_geoip_continent WHERE code = v_continent_code;
+
+                
+            END IF;
+
+            
 
             IF(v_id_tmp = 0) THEN
                 INSERT INTO core_geoip_country (code, name, continent_id) VALUES (v_iso, v_local_name, 0);