1
我想連接三個表與組concat.Problem是主表以json格式連接列。如何使用組連接在sql中連接三個表
查詢是工作,但一次又一次地重複接合列數據 查詢 - >
[SELECT tour_package.description AS description,
tour_package.NAME AS NAME,
GROUP_CONCAT(destination_continent.NAME) AS continent_name,
GROUP_CONCAT(travel_style.NAME) AS travel_style_name,
tour_package.id AS id,
tour_package.img_path_thumb AS img_path_thumb,
tour_package.continent_id,
tour_package.travel_style_id
FROM tour_package
LEFT JOIN destination_continent ON
FIND_IN_SET(destination_continent.id,
REPLACE(REPLACE(REPLACE(tour_package.continent_id, '\[', '') , '\]', '') , '\"', ''))
LEFT JOIN travel_style ON
FIND_IN_SET(travel_style.id,
REPLACE(REPLACE(REPLACE(tour_package.travel_style_id, '\[', '') , '\]', '') , '\"', ''))
WHERE `tour_package`.`DELETE` = 0 && `destination_continent`.`DELETE` = 0
LIMIT 0 , 30][1]
日Thnx,現在我笑我自己,我必須要爲內存補品 –