标签:src sel from color http tor nbsp select fat
1,把表中某一列的内容合并为一行
select province,CONCAT(‘[\"全部\",\"‘,GROUP_CONCAT(city ORDER BY cityID separator ‘\"\,\"‘),‘\"]‘) as group1 from hat_city a LEFT JOIN hat_province b on a.father=b. provinceID GROUP BY father
ORDER BY cityID:根据指定字段排序,再合并
separator:指定分隔符,本文分隔符为(",")
标签:src sel from color http tor nbsp select fat
原文地址:http://www.cnblogs.com/vijayfly/p/6023610.html