【发布时间】:2020-03-26 13:45:25
【问题描述】:
public function asset_rep()
{
$astid = $this->input->post("astid");
//print_r($astid);die;
$astrep_id = $this->input->post("astrep_id");
$this->asset_model->update_asset_rep($astid,$astrep_id);
redirect("asset/index");
}
public function update_asset_rep($astid,$astrep_id)
{
$astrep = implode(',', $astid);
echo $astrep;
$this->db->where('id',$astrep);
$this->db->update('pm1asset',array('owner' =>$astrep_id));
echo $this->db->last_query();
}
在上面的代码中,sn-p 第一个函数在控制器中声明,第二个函数在模型中声明。我想为在 $astrep 中具有 id 的多行更新所有者。谁能帮帮我?
【问题讨论】:
标签: javascript php sql codeigniter