How can I convert this query to active record?
\"UPDATE table_user SET email = \'$email\', last_ip = \'$last_ip\' where username = \'$username\' and status =
Try this
$data = array( 'email' =>$email, 'last_ip' => $last_ip ); $where = array('username ' => $username , 'status ' => $status); $this->db->where($where); $this->db->update('table_user ', $data);