How can I convert this query to active record?
"UPDATE table_user
SET email = '$email', last_ip = '$last_ip'
where username = '$username' and status = '$status'";
I tried to convert the query above to:
$data = array('email' => $email, 'last_ip' => $ip);
$this->db->where('username',$username);
$this->db->update('table_user',$data);
How about using the where clausa status?
# must I write db->where two times like this?
$this->db->where('username', $username);
$this->db->where('status', $status);
I also tried this:
$this->db->where('username', $username, 'status', $status);