Files
Antrean-Reguler/application/models/m_tipeuser.php
2025-05-14 12:02:52 +07:00

42 lines
1.1 KiB
PHP

<?php
class M_tipeuser extends CI_Model {
function index() {
$query = $this->db->get('master_tipeuser');
return $query->result();
}
function insert() {
$insert_tipeuser = array(
'mt_nama' => $this->input->post('namatipeuser'),
);
$insert = $this->db->insert('master_tipeuser', $insert_tipeuser);
}
function edit($id) {
$this->db->where('mt_id', $id);
$query = $this->db->get('master_tipeuser');
return $query;
}
function prosesedit() {
$update_tipeuser = array(
'mt_nama' => $this->input->post('namatipeuser'),
);
$id = $this->input->post('id');
$this->db->where('mt_id', $id);
$this->db->update('master_tipeuser', $update_tipeuser);
}
function view($id) {
$this->db->where('mt_id', $id);
$query = $this->db->get('master_tipeuser');
return $query;
}
function delete($id) {
$this->db->where('mt_id', $id);
$this->db->delete('master_tipeuser');
}
}
?>