HFD Posted August 19, 2008 Share Posted August 19, 2008 Hi, I've been researching pagination in PHP, and so far all I've come across is outputting a certain number of rows on one page, and another set on the next page...i.e. like a search engine. This would be ideal for listing my tutorials, but not for what I want... But what I hope to do is be able to split up my content into smaller chunks, as I'll be writing some rather large tutorials. Each row in my database is a seperate row, I want to split the 'content' field of each into different pages, maybe starting a new page when it encounters a certain line of text in the field...etc. Is this possible? Thanks Link to comment https://forums.phpfreaks.com/topic/120380-pagination-but-with-one-record/ Share on other sites More sharing options...
lemmin Posted August 19, 2008 Share Posted August 19, 2008 You will still have to query the entire content field, but you don't have to display it all. If you come up with the way to split it when displaying the first page, you can then just slice it in a different spot depending on the page number you send to your php. Link to comment https://forums.phpfreaks.com/topic/120380-pagination-but-with-one-record/#findComment-620289 Share on other sites More sharing options...
akitchin Posted August 19, 2008 Share Posted August 19, 2008 you can cut off the content field at a certain marker, but that would probably be more work for the database server than just grabbing the whole field. if you do grab the whole field, you can chunk it using PHP and perhaps this would allow much smoother page turning - since it's all out already, you could just use some dynamic JS/CSS work to flip pages rather than needing to force a reload. Link to comment https://forums.phpfreaks.com/topic/120380-pagination-but-with-one-record/#findComment-620293 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.