SELECT *,GROUP_CONCAT(qy.qy_name SEPARATOR ';') AS NAME
FROM ydyl_xdxx xdxx INNER JOIN ydyl_qy qy ON(xdxx.xd_id=qy.qy_xd_id)
WHERE qy.qy_statu=1 GROUP BY xd_ssidtype
关键字:
1.GROUP_CONCAT
2.GROUP BY
SELECT *,GROUP_CONCAT(qy.qy_name SEPARATOR ';') AS NAME
FROM ydyl_xdxx xdxx INNER JOIN ydyl_qy qy ON(xdxx.xd_id=qy.qy_xd_id)
WHERE qy.qy_statu=1 GROUP BY xd_ssidtype
关键字:
1.GROUP_CONCAT
2.GROUP BY