Welcome Guest, Not a member yet? Register   Sign In
Pagination problem : Only even page number
#2

[eluser]anggie[/eluser]
This is my 'simplified' controller :
Code:
<?
class Dadan extends Controller{
    function Dadan(){
        parent::Controller();
        $this->load->library('pagination');
    }
    function hello(){
        $limit=$this->uri->segment(3);                
        
        if($limit==''){
              $limit=1;
              }
          $limit=($limit-1)*2;
        
        $data['query']= $this->db->get('posting',2,$limit);

        $total_page=$this->db->count_all('posting');
        $config['base_url'] = base_url().'index.php/dadan/hello/';
        $config['full_tag_open'] = '<div class=paging>';
        $config['full_tag_close'] = '</div>';
        $config['uri_segment'] = 3;
        $config['next_link'] = 'Next';
        $config['prev_link'] = 'Prev';
        $config['num_links'] = 3;
        $config['total_rows'] = $total_page;
        $config['per_page'] = '2';        
        $this->pagination->initialize($config);
        $data['link']=$this->pagination->create_links();
        $data['total']=$total_page;
    
        $this->load->view('hello',$data);
    }
}
?&gt;

Come on...help me please...


Messages In This Thread
Pagination problem : Only even page number - by El Forum - 09-02-2008, 10:19 AM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 05:45 PM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 05:54 PM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 06:27 PM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 06:51 PM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 08:04 PM
Pagination problem : Only even page number - by El Forum - 09-02-2008, 08:25 PM
Pagination problem : Only even page number - by El Forum - 09-03-2008, 12:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB