when i try to update a table i get an error that time.
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);
}