Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class M_kategori extends CI_Model {
- function kategori(){
- $kategori = $this->db->query("SELECT * FROM tb_kategori");
- return $kategori->result();
- }
- function create_kategori($data){
- $this->db->insert('tb_kategori','$data')
- }
- function update_kategori($where,$data,$table){
- $this->db->where($where);
- $this->db->update($table,$data);
- }
- function delete_kategori($where = 0){
- $this->db->delete('tb_kategori', array('id_kategori' => $where));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement