Paging one Recordset

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
Bart
Forum Newbie
Posts: 9
Joined: Sat May 04, 2002 12:12 pm
Location: Ontario Canada

Paging one Recordset

Post by Bart »

Ok, first of all. What am I talking about? well, take a look at this
Gamespot article, notice how they are able to Page an Article? The same thing can be found at phpbuilder.com, devarticles.com, etc.

Now I was wondering how this is achieved, are they just placing 4 or whatever new records into a database and giving them a special "id" so they go together or is there somehting more?

I don't find the way I just suggested very reliable so I was wondering if anyone had a theory how how a single record set can be paged like that.
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

OK this is a very interesting idea... I just started designing the same thing yesterday for the articles section of evilwalrus.com (Still have a good article that doesn't work right). What I did is made a table called articles with 5 columns: id auto_increment, author, subject, description, time; and another table article_page: a_id = article.id, page_id, page_title, body. Now basicly all you have to do is insert an article and for each page you add the data to the page table and increase the page_id field... It isn't very complex atall...

Good luck...

Cheers Sam
Post Reply