pagnation - but I have read the tutorials
Posted: Wed Mar 15, 2006 5:37 am
Ok. As this is a theorectical question it can be posted here. I have trawled countless forums and tutorials on various websites here, phpbuilder, phpfreaks etc and I can't really seem to find an answer to my problem. Maybe they just haven't been explained in a way I understand yet. :/
I have already paginated my results pulled from MySQL database... it was easy I copied the tutorial in the book (I'm sure there is a better way of writing it but I'll go back and look at that when I'm a bit more proficient).
I am pulling records from MySQL database which are articles with some images included. The articles are of various lengths and the images various sizes. As the result of this limiting to 5 records per page has different results depending on which articles are to be displayed.
Page 1 currently has a lot of space at the bottom of the page as the articles displayed here are quite short. Page 2 has large articles and overshoots the bottom of my page template causing the /div its posted in to continue on past the bottom of the rest of my page.
Is there a way of limiting results based on total number of characters contained in a specific field (if I establish how many characters could fit on the page to begin with)instead of just limiting by number of rows returned?
Or is it possible to create (from the query results) a page height variable that can be posted to the other parts of my web page so that the rest of the site fits the results.
If either is possible which would be the better of the two? If not any suggestions with how to deal with this? Any links to resources which might give me ideas on where to start with the coding would also be appreciated.
Thanks
I have already paginated my results pulled from MySQL database... it was easy I copied the tutorial in the book (I'm sure there is a better way of writing it but I'll go back and look at that when I'm a bit more proficient).
I am pulling records from MySQL database which are articles with some images included. The articles are of various lengths and the images various sizes. As the result of this limiting to 5 records per page has different results depending on which articles are to be displayed.
Page 1 currently has a lot of space at the bottom of the page as the articles displayed here are quite short. Page 2 has large articles and overshoots the bottom of my page template causing the /div its posted in to continue on past the bottom of the rest of my page.
Is there a way of limiting results based on total number of characters contained in a specific field (if I establish how many characters could fit on the page to begin with)instead of just limiting by number of rows returned?
Or is it possible to create (from the query results) a page height variable that can be posted to the other parts of my web page so that the rest of the site fits the results.
If either is possible which would be the better of the two? If not any suggestions with how to deal with this? Any links to resources which might give me ideas on where to start with the coding would also be appreciated.
Thanks