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

class Model_kategori extends CI_Model {

	public function tampil_data()
	{
		return $this->db->get('kategori_artikel');
	}

	public function tambah_kategori($data, $table)
	{
		$this->db->insert($table, $data);
	}

	public function edit_kategori($where, $table)
	{
		return $this->db->get_where($table, $where);
	}

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

	public function hapus_data($where, $table)
	{
		$this->db->where($where);
		$this->db->delete($table);
	}
}

