foreach ($orderGoodslist as $key => $value){
$goods_id['goods_id'] = $value['orderdetail_goodsid'];
$goods_salesvolume['goods_salesvolume'] = $value['orderdetail_goodsnum'];
$mGoods->where($goods_id)->setfield('goods_salesvolume','+$goods_salesvolume');
}
//---------------------------------------------
setfield('goods_salesvolume','+$goods_salesvolume');
我要设置goods_salesvolume字段本身在加上$goods_salesvolume
官方文档看不懂 希望大神能指教一下
如果是累加,可以使用setInc方法
$goods_salesvolume 是要对goods_salesvolume字段增加的值