How can I convert this query to active record?
\"UPDATE table_user
SET email = \'$email\', last_ip = \'$last_ip\'
where username = \'$username\' and status =
you can use an array and pass the array.
Associative array method:
$array = array('name' => $name, 'title' => $title, 'status' => $status);
$this->db->where($array);
// Produces: WHERE name = 'Joe' AND title = 'boss' AND status = 'active'
Or if you want to do something other than = comparison
$array = array('name !=' => $name, 'id <' => $id, 'date >' => $date);
$this->db->where($array);