1,把表中某一列的内容合并为一行
SELECT province,CONCAT('[\"全部\",\"',GROUP_CONCAT(cityname ORDER BY cityid SEPARATOR '\"\,\"'),'\"]') as group1
from vrc_zgz_citys a LEFT JOIN vrc_zgz_provinces b on a.provinceid=b.provinceid
GROUP BY province
ORDER BY cityID:根据指定字段排序,再合并
separator:指定分隔符,本文分隔符为(",")