Advertisement
Thalutn5

Untitled

Mar 31st, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') or exit('No direct script access allowed');
  3.  
  4. class ModelKategori extends CI_Model
  5. {
  6.     public function data_elektronik()
  7.     {
  8.         $result = $this->db->get_where('tb_barang', ['kategori_brg' => 'Electronics']);
  9.         return $result->result_array();
  10.     }
  11.  
  12.     public function data_clothes()
  13.     {
  14.         $result = $this->db->get_where('tb_barang', ['kategori_brg' => 'Clothes']);
  15.         return $result->result_array();
  16.     }
  17.  
  18.     public function data_sports()
  19.     {
  20.         $result = $this->db->get_where('tb_barang', ['kategori_brg' => 'Sports']);
  21.         return $result->result_array();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement