If you want a mysql solution you could use a proper replace
(如果您想要mysql解决方案,则可以使用适当的替换)
select t.`Perfume ID`,
replace( t.`Notes` , concat(', ' ,
SUBSTRING_INDEX( t.`Notes` ,',',-1)
) ,
concat('& ' ,
SUBSTRING_INDEX( t.`Notes` ,', ',-1)
))
from (
SELECT `tbl_perfumes`.`pk_int_perfumeID` AS `Perfume ID`,
GROUP_CONCAT(DISTINCT `tbl_notes`.`txt_noteName`
ORDER BY `tbl_notes`.`txt_noteName` ASC SEPARATOR ', ' ) AS `Notes`
FROM `tbl_notes` JOIN `tbl_perfumeNotes`
ON `tbl_notes`.`pk_int_noteID` = `tbl_perfumeNotes`.`fk_int_noteID`
JOIN `tbl_perfumes` ON `tbl_perfumeNotes`.`fk_int_perfumeID` = `tbl_perfumes`.`pk_int_perfumeID`
WHERE `tbl_perfumes`.`pk_int_perfumeID`=1
GROUP BY `tbl_perfumes`.`pk_int_perfumeID`
) t
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…