[eluser]achilleusrage[/eluser]
Hi. Your double quotes in the third parameter for $this->db->update() are wrong.
Your code:
Code:
"person_id = $person_id" AND "logout_time = 00:00:00"
...evaluates to 1.
You want to do:
Code:
$this->db->update('employee_logs', $data, 'person_id = $person_id AND logout_time = 00:00:00');
// or, more to write but easier to follow in my opinion.
$this->where("person_id",$person_id);
$this->where("logout_time","00:00:00");
$this->db->update('employee_logs', $data);