一对多情况下 ,将多行查询结果合并为一行展示
2022-11-10 本文已影响0人
geeooooz
$customer = M('customer')
->field('salesman_id')
->field("salesman_id,GROUP_CONCAT(concat_ws('#',id) separator',') AS group_combo")
->where(['salesman_id'=>$salesman_id])->order('salesman_id')->select();
dump($customer);die;
引用地址
https://blog.csdn.net/weixin_44585369/article/details/122528778