Posted 15 March 2006 - 11:49 AM
I have trawled countless forums and tutorials on various websites Devnetwork, phpbuilder 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.
MySql 5.0 PHP 5.1.2
Posted 15 March 2006 - 02:05 PM
When you insert the articles into the database, perhaps you could classify them as LONG, MED, SHORT, then use some logic like LONG=2*MED and MED=2*SHORT, so you post 1 LONG or 2 MED or 4 SHORT or 1 MED and 2 SHORT, etc...
Now it's just building the logic in your querries...
Posted 15 March 2006 - 02:06 PM
Your css should not allow a div insidea containing div to outsize the container. (i.e the container should enlarge first, allowing the inside div to also expand, allowing the full text to be placed into it.)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users