合并数组进行修改数据 --- 2019-01-10
2019-01-10 本文已影响0人
一位先生_
//修改合同时间
$contract_id = M('fr_wholesaler_contract')
->where(['wholesaler_id'=>$data['wholesaler_id']])
->field('id')
->select();
$arrs = array();
foreach($contact_time as $k=>$r){
$arrs[] = array_merge($r,$contract_id[$k]);
}
foreach($arrs as $key=>$value){
$res['contract'] = M('fr_wholesaler_contract')
->where(['id'=>$value['id']])
->save($value);
}