Welcome Guest, Not a member yet? Register   Sign In
Problem in multiple pages
#1

[eluser]saymes[/eluser]
Okay, I am pretty new in CI and I am stuck on pagination. I am performing this pagination on a record set that is result of a query. Now everything seems to be working fine. But there’s some problem probably with the link. I am displaying 10 results per page. Now if the results are less than 10 then it’s fine. Or If I pull up the entire records in the table it works fine. But in case the result is more than 10 rows, then the first 10 is perfectly displayed, and when I click on the pagination link to get to the next page the next page displays the rest of the results from the query as well as, other records in the table. ??? I am confused.. Any help??


here’s the controller code ....

class Viewforum extends Controller {

function Controller ()
{
parent::Viewforum();
}
function id($id='')
{
echo 'fff';
}
}

// the link is like this
index/viewforum/id/3
// I want it
index/viewforum/id/3/P5 or index/viewforum/id/3/pg/5
//What am I doing wrong here ???? Pls help ...
#2

[eluser]Thorpe Obazee[/eluser]
You could try reading this:

http://pinoytech.org/blog/post/Paginatio...odeIgniter




Theme © iAndrew 2016 - Forum software by © MyBB