Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function ambildata()
- {
- if ($this->input->is_ajax_request() == true) {
- $this->load->model('admin/member/Modelmember', 'member');
- $list = $this->member->get_datatables();
- $data = array();
- $no = $_POST['start'];
- foreach ($list as $field) {
- $no++;
- $row = array();
- $row[] = $no;
- $row[] ='';
- $data[] = $row;
- }
- $output = array(
- "draw" => $_POST['draw'],
- "recordsTotal" => $this->member->count_all(),
- "recordsFiltered" => $this->member->count_filtered(),
- "data" => $data,
- );
- //output dalam format JSON
- echo json_encode($output);
- } else {
- exit('Maaf data tidak bisa ditampilkan');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement