Welcome Guest, Not a member yet? Register   Sign In
Help! with pagination!!
#3

[eluser]Unknown[/eluser]
I have got the point I was sending wrong argument to the model I come up with two changes in the controller and it solved my problem.... thought that might be helpful for others...
Here goes the two changes that I made to the function in controller that contain the pagination.


Code:
public function makeManagement($passed_data=NULL,$page=NULL)
    {
          $data = array();
          if($passed_data!=NULL)
          $data =(array)$passed_data;
        
          $this->load->library('pagination');
          $query = $this->db->get('tbl_make');
          $a = $query->num_rows();
          $config['base_url'] = base_url().'index.php/admin/makeManagement/';
          $config['total_rows'] = $a;
          $config['per_page'] = '10';
          $config['uri_segment'] = 3;
          $config['full_tag_open'] = '<p>';
          $config['full_tag_close'] = '</p>';
          $this->pagination->initialize($config);
          $this->load->model('admin_model');
          $data['makes'] =$this->admin_model->get_make($config['per_page'],$page);
          $this->load->view('make_management', $data);


Messages In This Thread
Help! with pagination!! - by El Forum - 07-15-2011, 05:40 AM
Help! with pagination!! - by El Forum - 07-16-2011, 03:54 AM
Help! with pagination!! - by El Forum - 07-20-2011, 08:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB