public function select_data() {
$this->config->load(' pagination');
$config = $this->config->item(' pagination_config');
$offset = $this->input->post("p") ? $this->input->post("p") : 1;
$per_page = $this->input->post("pp") ? $this->input->post("pp") : 10;
$this->uri->assign_segments(3, $offset);
$config['base_url'] = site_url('account/select_data' );
$config['total_rows'] = $this->account_model->count_ row();
$config['per_page'] = $per_page;
$config['uri_segment'] = "3";
$start = ($offset - 1) * $config['per_page'];
$this->pagination->initialize( $config);
$data["pagination"] = $this->pagination->create_ links();
$data["total"] = $config['total_rows'];
$data['start'] = $data["total"] ? $start + 1 : 0;
$data['end'] = (($start + $config['per_page']) < $config['total_rows']) ? $start + $config['per_page'] : $config['total_rows'];
$data['account'] = $this->account_model->get_all_ account($config['per_page'], $start);
// $data = $this->account_model->get_ account();
$this->load->view('account_ table', $data);
}
No comments:
Post a Comment