0

------------------------------------------------------
Main code:
------------------------------------------------------

 public function forum_detail_info($post_id) {
        $data = array();
          $this->load->library('pagination');
        $config['base_url'] = base_url() . 'welcome/forum_detail_info/';

        $config['total_rows'] = $this->db->count_all('tbl_forum');
        $config['per_page'] = 3;
        $this->pagination->initialize($config);
        $data['about'] = $this->welcome_model->about_info();
        $data['about'] = $this->welcome_model->about_info();
        $data['forum_post_info'] = $this->welcome_model->select_all_forum_post_info($post_id);
        //---------------more
        $this->load->view('website/include/header', $data);
        $this->load->view('website/master_page', $data);
        $this->load->view('website/include/footer');
    }


----------------------------------------------
  I want code:
----------------------------------------------


   public function forum_detail_info($post_id) {
        $data = array();
          $this->load->library('pagination');
        $config['base_url'] = base_url() . 'welcome/forum_detail_info/';

        $config['total_rows'] = $this->db->count_all('tbl_forum');
        $config['per_page'] = 3;
        $this->pagination->initialize($config);
        $data['about'] = $this->welcome_model->about_info();
        $data['forum_post_info'] = $this->welcome_model->select_all_forum_post_info($post_id);
       $data['forum_post_info'] = $this->welcome_model->select_all_forum_post_info($config['per_page'], $this->uri->segment(3),$post_id);
         //--------------more
        $this->load->view('website/include/header', $data);
        $this->load->view('website/master_page', $data);
        $this->load->view('website/include/footer');
    }
2
Contributors
2
Replies
9
Views
2 Years
Discussion Span
Last Post by Web Dev Rob
0

I can create pagination for those function (1) that has no parameter,But i can not do for those function that has parameter (2)like--

(1)

public function forum_detail_info() {
------
}

(2)

public function forum_detail_info($post_id) {
----}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.