pojr Posted June 10, 2008 Share Posted June 10, 2008 In message boards, after a certain amount of messages, the page continues to a different page. However for me, the messages just keep pouring and pouring. How is this done? http://www.dan92.yfma.com/forums/t.php?id=32 Link to comment https://forums.phpfreaks.com/topic/109513-question-about-descending-pages/ Share on other sites More sharing options...
bluejay002 Posted June 10, 2008 Share Posted June 10, 2008 One way: You need to have two queries... one query that will get the total number of posts for the said subject and the other that will fetch the posts within a cetain limit... (SQL Stuff: using LIMIT). The key here is that you will specify the pages (to be extended) basing on the allowed number of posts per page against the total number of posts. From these, you will get the parameters to be passed along when specifying your LIMIT in your query. hope it helps :-) Link to comment https://forums.phpfreaks.com/topic/109513-question-about-descending-pages/#findComment-561763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.