Pagination without using connection object

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jishcem
Forum Newbie
Posts: 12
Joined: Tue Nov 10, 2009 11:48 pm

Pagination without using connection object

Post by jishcem »

Hello there,
I would like to know whether there is any trick to paginate with out using mysql operations. Most of the pagination script available on the net is using connection object.
I would like to paginate without using that. Because I am calling a function which returns an array of objects which will contain the field values of the database.

Hoping for reply.

Regards, Ajeesh.
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: Pagination without using connection object

Post by pcoder »

You can go through the different UI stuffs. For a small recordset, you can use the jQuery Tablesorter plugin.
But remember, for a huge recordset, it would be better to fetch the defined rows at a time. 8)
jishcem
Forum Newbie
Posts: 12
Joined: Tue Nov 10, 2009 11:48 pm

Re: Pagination without using connection object

Post by jishcem »

Thanks
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Pagination without using connection object

Post by pickle »

array_slice() might be handy.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply