sh1fralf4tih

Untitled

Nov 12th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class Sheetmkios extends CI_Model {
  4.    
  5.     private $table = "kjnt_form_2";
  6.     public function __construct()
  7.     {
  8.         parent::__construct();
  9.     }
  10.  
  11.     public function get_data_cell($dari,$sampai)
  12.     {
  13.         if($dari != null && $sampai != null)
  14.         {
  15.             $this->db->where('substr(TGLTRX,1,10) >=',$dari);
  16.             $this->db->where('substr(TGLTRX,1,10) <=',$sampai);
  17.         } //else { 
  18.             // $this->db->where('substr(TGLTRX,1,10) >=',date("Y-m-d"));
  19.    //      }
  20.    //      if($this->input->post('NMRS'))
  21.    //      {
  22.    //          $this->db->where('NMRS', $this->input->post('NMRS'));
  23.    //      }
  24.    //      if($this->input->post('NMSAL'))
  25.    //      {
  26.    //          $this->db->where('NMSAL', $this->input->post('NMSAL'));
  27.    //      }
  28.    //      if($this->input->post('KOTA'))
  29.    //      {
  30.    //      $this->db->where('KOTA', $this->input->post('KOTA'));
  31.    //      }       
  32.    //      if($this->input->post('CLUSTER'))
  33.    //      {
  34.    //          $this->db->where('CLUSTER', $this->input->post('CLUSTER'));
  35.    //      }
  36.  
  37.         $query = $this->db->get($this->table);
  38.         return $query->result();
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment