[SOLVED]Pagination Problem! |
[eluser]husni[/eluser]
not yet.. still static on the page 1 even though i clicked number 2..
[eluser]maria clara[/eluser]
try to change this line in your controller Code: if (isset($page) && is_int($page)) to Code: if (isset($page) && is_numeric($page))
[eluser]husni[/eluser]
it's still the same.. i don't know what is the problem actually. what is the function of this one?? do i need to echo the query?? Code: $data['query'] = $this->Helpdesk_model->getAllReport(5,$offset);
[eluser]maria clara[/eluser]
[quote author="husni" date="1264672178"]it's still the same.. i don't know what is the problem actually. what is the function of this one?? do i need to echo the query?? Code: $data['query'] = $this->Helpdesk_model->getAllReport(5,$offset); what's now happening in your pages?? this Code: $data['query'] = $this->Helpdesk_model->getAllReport(5,$offset); this time your pagination should be the uri is getting pull and querying the database correctly. what happens now with your links?? is it incrementing now?
[eluser]husni[/eluser]
still display the same thing.. the link is incremented already.. but when i click to go to the second set of data..it still in the first set of data.. what's going on huhu...
[eluser]husni[/eluser]
Code: function getAllReport($num = NULL, $offset = NULL) just changed the code a little bit in the model..
[eluser]maria clara[/eluser]
the pagination is giving you an offset instead of a page number...try to change Code: $offset = ($page-1) * $config['per_page']; to Code: $offset = $page; and let us see what will now happen..
[eluser]husni[/eluser]
erhhh.. still the same??!! any other solutions? huhu i have 10 reports.. but it only display 5 of them..
[eluser]husni[/eluser]
Quote:http://www.devshed.com/c/a/PHP/Paginatin...Framework/ this is the link to the source code where i got the code for my pagination..
[eluser]maria clara[/eluser]
i don't know what's happening in your pagination..i'll try to read your link of where you got your code for that.. |
Welcome Guest, Not a member yet? Register Sign In |