select p.id,p.parent_id,group_concat(distinct(CONCAT("分类名称:",c.name)) order by c.id desc separator " || ") as remark from picture as p left join category as c on c.parent_id = p.parent_id group by p.parent_id;
时间: 2024-11-05 13:43:07
select p.id,p.parent_id,group_concat(distinct(CONCAT("分类名称:",c.name)) order by c.id desc separator " || ") as remark from picture as p left join category as c on c.parent_id = p.parent_id group by p.parent_id;