直接上sql,简单粗暴!!
SELECT
t1.area_name AS '省',
t2.area_name AS '市',
t3.area_name AS '区'
FROM
( SELECT * FROM base_area_new WHERE area_type = 1 AND version = 2 AND data_status = 1 ) AS t1
INNER JOIN ( SELECT * FROM base_area_new WHERE area_type = 2 AND version = 2 AND data_status = 1 ) AS t2 ON t2.parent_code = t1.area_code
INNER JOIN ( SELECT * FROM base_area_new WHERE area_type = 3 AND version = 2 AND data_status = 1 ) AS t3 ON t3.parent_code = t2.area_code