28 lines
470 B
PHP
Executable File
28 lines
470 B
PHP
Executable File
<?php
|
|
|
|
if (!defined('BASEPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
class Settings_model extends CI_model {
|
|
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->load->database();
|
|
}
|
|
|
|
function getSettings() {
|
|
$query = $this->db->get('settings');
|
|
return $query->row();
|
|
}
|
|
|
|
function updateSettings($id, $data) {
|
|
$this->db->where('id', $id);
|
|
$this->db->update('settings', $data);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|