我有这个MySQL查询,它工作得很好,我只需要为properties.advantages.
中的每个id抓取advantages.value
正如您在图像中看到的那样,列Advantages设置得很好(至少对于我,我没有创建这个),ID由-
分隔。我怎样才能获得这些价值?从表中选择值,ID在一列
SELECT
properties.id,
(SELECT types.value FROM types WHERE types.id = properties.type_id) as types,
properties.price,
properties.town_id,
**(SELECT advantages......),**
towns.id,
towns.value
FROM properties
LEFT JOIN towns
ON properties.town_id=towns.id
WHERE properties.published='1'
有什么问题吗? – sagi
嗯,对不起,我需要获得这些值,对于列 –