umkm-app/application/models/KelurahanModel.php

21 lines
429 B
PHP
Raw Permalink Normal View History

2021-09-15 21:00:06 +07:00
<?php
class KelurahanModel extends CI_Model
{
private $_table = "tb_kelurahan";
public function getKelurahan(){
$this->db->order_by('kelurahan', 'ASC');
return $user = $this->db->get($this->_table)->result();
}
public function getKecamatanByKelurahan($kelurahan){
$this->db->where('kelurahan', $kelurahan);
return $user = $this->db->get($this->_table)->row();
}
}