时间:2021-07-01 10:21:17 帮助过:8人阅读
$sql = "SELECT attr_value, thumb_url "." FROM " . $GLOBALS['ecs']->table('goods_attr')
.'where goods_id='.$row['goods_id'].' and attr_id=185 order by attr_value asc';
$cm = $GLOBALS['db']->getAll($sql);
$ys_arr=array();
$ysimg_arr=array();
foreach ($cm as $val)
{
$ys_arr[$val['attr_value']] = $val['attr_value'];
$ysimg_arr[$val['thumb_url']] = $val['thumb_url'];
}
$arr[$row['goods_id']]['attr_value'] =implode('、',$ys_arr);
$arr[$row['goods_id']]['thumb_url'] =implode(' ',$ysimg_arr);