doumiebiao6827
2017-10-11 07:06
浏览 72
已采纳

codeigniter和mysql更新错误?

when i try to update a table i get an error that time. error image

there is my controller code.

$this->hr_user->insert_user($info);

        $n=explode('--', $info['user_code']);
        $temp=$n[1];
        $lnum=ltrim($temp,'0');
        //print_r($lnum);
        //echo "<br>lastnumber".$lnum;
        $id=$info['user_type'];
        echo $id.''.$lnum;



        $this->hr_user->update_number($id,$lnum);



        redirect('hrm/index');

and here is my model code.

public function update_number($id,$lnum)
{
    $this->db->where('em_id',$id);
    $this->db->update('tbl_emaster.em_lastnumber',$lnum);

}

4条回答 默认 最新

相关推荐 更多相似问题