<?php

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

class Web_management_model extends CI_Model
{

    public $table = 'web_management';
    public $id = 'id';
    public $order = 'DESC';

    function __construct()
    {
        parent::__construct();
    }

    // get style
    function get_style()
    {
        $this->db->select('*');
        $this->db->from('web_management');
        $this->db->join('web_style_2', 'web_management.style_web = web_style_2.id_web_style');
        return $this->db->get()->row();
    }

    // get data by id
    function get_by_id($id = 1)
    {
        $this->db->where($this->id, $id);
        return $this->db->get($this->table)->row();
    }

    // update data
    function update($id, $data)
    {
        $this->db->where($this->id, $id);
        $this->db->update($this->table, $data);
    }
}

/* End of file Web_management_model.php */
/* Location: ./application/models/Web_management_model.php */
/* Please DO NOT modify this information : */
/* Generated by IDETech Codeigniter CRUD Generator 2020-03-29 18:02:17 */
/* http://idetech.id */