deploy awal
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
class Model_kategori extends CI_Model {
|
||||
|
||||
function tampilkan_data() {
|
||||
|
||||
return
|
||||
$this->db->get('suplier')->result();
|
||||
}
|
||||
function post()
|
||||
{
|
||||
$data=array
|
||||
(
|
||||
'nama_perusahaan'=> $this->input->post('suplier')
|
||||
);
|
||||
$this->db->insert('suplier', $data);
|
||||
}
|
||||
|
||||
function edit()
|
||||
{
|
||||
$data=array('nama_kategori'=> $this->input->post('kategori'));
|
||||
$this->db->where('id_kategori', $this->input->post('id'));
|
||||
$this->db->update('kategori',$data);
|
||||
}
|
||||
|
||||
function get_one($id)
|
||||
{
|
||||
$param = array('id_kategori'=>$id);
|
||||
return $this->db->get_where('kategori',$param);
|
||||
}
|
||||
|
||||
function hapus($id)
|
||||
{
|
||||
$this->db->where('id_kategori', $id);
|
||||
$this->db->delete('kategori');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user