Well, your question is a very broad question. Not knowing anything about your setup, all I can do is give a general response. If you want something more specific, it'd be best to include that when asking the monks for help.

Again, I have to be very broad here. I don't know if you're pulling from a database, or a text file, or what. If I were to pull from a database, I'd be using indexes and limits. I would run an SQL query such as this:

SELECT Title, Entry, Author FROM GBook ORDER BY SubDate LIMIT 0, 10

In such a case, that means we're selecting 10 records starting at record #1 (I could have those numbers reversed). Then all I would have to do is keep track of what number to start on, and you can generate the previous/next based on that.

Anyhow, making each row a different color is also a matter of keeping track of what's going on. You might want to have a test to check what row its on. Even rows should get printed in one color, odd rows in another.


In reply to Re: Syntax Questions by Coplan
in thread Syntax Questions by rugrat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.