How can I convert this query to active record?
\"UPDATE table_user SET email = \'$email\', last_ip = \'$last_ip\' where username = \'$username\' and status =
Yes, multiple calls to where() is a perfectly valid way to achieve this.
$this->db->where('username',$username); $this->db->where('status',$status);
http://www.codeigniter.com/user_guide/database/query_builder.html