33 lines
674 B
PHP
33 lines
674 B
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class ModelMitra extends CI_Model{
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
//Codeigniter : Write Less Do More
|
|
}
|
|
|
|
public function get_pusat()
|
|
{
|
|
return $this->db->get("pusat");
|
|
}
|
|
|
|
public function get_data($idpusat = null){
|
|
if ($idpusat != null || $idpusat != "") {
|
|
$this->db->where("pusat_idpusat",$idpusat);
|
|
}
|
|
return $this->db->get('mitra');
|
|
}
|
|
|
|
public function get_data_mitra($idmitra=null)
|
|
{
|
|
if ($idmitra != null || $idmitra != "") {
|
|
$this->db->where("mitra.idmitra",$idmitra);
|
|
}
|
|
return $this->db->get('mitra');
|
|
}
|
|
|
|
}
|