Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Pagination Problem!
#31

[eluser]husni[/eluser]
Quote:http://localhost/helpdesk2/index.php/paging/display/5

when i put this uri manually..it display the other 5 set of data..
and when i click number 2, the uri will be change to the

Quote:http://localhost/helpdesk2/index.php/pag...per_page=5

configuration maybe??
#32

[eluser]maria clara[/eluser]
The links should be in increments of 5, but it should show the correct page now,

5= page 1
10= page 2
15 = page 3
etc..

maybe??
#33

[eluser]husni[/eluser]
[quote author="maria clara" date="1264685712"]The links should be in increments of 5, but it should show the correct page now,

5= page 1
10= page 2
15 = page 3
etc..

maybe??[/quote]

1-5 = page 1
6-10 = page 2

but how can the '&per_page=5' exist???
need to correct that thing now..
#34

[eluser]husni[/eluser]
hey! i have found the cause to my failure..actually it is about my config file..

Quote:$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use

i changed that to this:

Quote:$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
//$config['directory_trigger'] = 'd'; // experimental not currently in use

and my pagination is success!!
thank you so much for your help!! :-)
#35

[eluser]maria clara[/eluser]
im glad i was able to help you again..:-).

cheers,
kahtrina Wink
#36

[eluser]cafesuada[/eluser]
oh, my!! I get this problem and still not solved :|. Please help me.
Actually I get problem with the pagination link. Database displayed correctly with the $per_page and $offset. But the link's always at the first although the $offset changed.
This is my short view:
FristPage
SecondPage

And here my code:
Controller:
Code:
$config['base_url']=base_url().'/news/main/index/';
             $config['total_rows']=$this->db->get('news')->num_rows();
             $config['per_page']=2;
        
      
            $this->pagination->initialize($config);
        
            
            $this->data['All_New']=$this->db->get('news',$config['per_page'],$this->uri->segment(4));
            
            $this->load->view('new/index',$this->data);

View:
Code:
<div id="new_container">
&lt;?php
  echo $this->table->generate($All_New);
?&gt;</div>
<div id="pagination_link">
&lt;?php
    echo $this->pagination->create_links();
?&gt;
</div>

Help me please




Theme © iAndrew 2016 - Forum software by © MyBB