Pagination for a single record

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
boba fett
Forum Newbie
Posts: 15
Joined: Fri Jul 09, 2010 2:48 pm

Pagination for a single record

Post by boba fett »

I am having a problem applying pagination to my page when I only have one record displayed. I would like to have it set up to where one record is followed by the next one in the list. I have tried several ways but they are for whole tables moving to the next page. I think I am missing something small but not sure. Any help will be greatly appreciated, thanks.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Pagination for a single record

Post by Jade »

What kind of keys do you have on the table? Are you using an auto_incremental ID? If so you can just have something where you add 1 or subtract 1 to the current ID to get the ID of the next and previous records.
Post Reply