<?php
class Settings_Model extends CI_Model {
    public function __construct(){
        parent::__construct();
        $this->settings = TBL_SETTINGS;
    }
    
    public function get_by_id() {
        $resource = $this->db->get($this->settings);
        return $resource->row();
    }
    
    public function update($id, $data){
        $this->db->where('id', $id);
        $this->db->update($this->settings, $data);
        return $this->db->affected_rows();
    }
}
?>
