在函数 update_status 中,第二个更新查询不起作用。数组中的值正确获取和正确。有人可以帮我吗?
这是我的代码:
function update_status($appno,$value,$user_note,$date)
{
$status = array(
'app_status' => $value, );
$this->db->where('app_no',$appno);
$this->db->update('tbl_application', $status);
$today = date('Y-m-d');
$emp = $this->session->userdata('username');
$this->db->select('*');
$this->db->from('tbl_employee');
$this->db->where('Name', $emp);
$query = $this->db->get();
foreach($query->result() as $row)
{ $emp_code = $row->EmployeeCd; }
$data = array(
'app_no' => $appno,
'office_code' => 'KL08',
'verifi_status' => $value,
'view_status' => 1,
'view_by' => $emp_code,
'first_view' => $date,
'last_view' => $today,
'modification' => $user_note,
'modifi_status' => '1',
'notes' => 'NA'
);
$this->db->update('tbl_appverification', $data);
$this->db->where('app_no',$appno);
}