public function getDistritos()
{
$this->db->order_by('descrip','asc');
$distrito=$this->db->get('distrito');
if ($distrito->num_rows() > 0) {
return $distrito->result();
}
}
public function getCargos()
{
$this->db->order_by('ncargo','asc');
$cargo=$this->db->get('cargos');
if ($cargo->num_rows() > 0) {
return $cargo->result();
}
}
public function index()
{
$this->load->model('Person_model');
$data['distrito'] = $this->Person_model->getDistritos();
$data['cargos'] = $this->Person_model->getCargos();
$this->load->helper('url');
$this->load->view('person_view',$data);
}