umkm-app/application/models/KategoriModel.php

20 lines
375 B
PHP

<?php
class KategoriModel extends CI_Model
{
private $_table = "tb_kategori";
public function getKategori(){
return $user = $this->db->get($this->_table)->result();
}
public function getKategoriById($id_kategori){
$this->db->where('id_kategori', $id_kategori);
return $user = $this->db->get($this->_table)->row();
}
}