<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Setings_model extends CI_Model {
    
    public function __construct() {
        parent::__construct();
        $this->db = $this->load->database('default', TRUE);
        $CI =& get_instance();
        $CI->db =& $this->db;
    }

    public function update_setings($update_data){
    	$this->db->where('setings_id',1);
    	$this->db->update('company_setings',$update_data);
    }

    public function get_setings(){
    	return $this->db->select('*')
    			->from('company_setings')
    			->where('setings_id',1)
    			->get()
    			->row();
    }

    public function update_pswd($update_data,$where){
        $this->db->where($where);
        $this->db->update('user_settings',$update_data);
    }

}?>