Hey, I left this program alone for a while and now i'm working on it again. I'm trying to view the first 100 records from a database and then display the next 100 and so on. I'm able to display the first 100 but i don't know how to show the next 100. This is the section of my program that's supposed to do this: my ($row)=0; my ($count)=0; my ($min)=0; my ($max)=$min+100; while ($db->FetchRow()) { if(($row>=$min)&&($row<$max)) { my (%dbrow) = $db->DataHash(); $dbrow{'details'}=substr($dbrow{'details'},0,50); print<<HERE_HTML_ROW; <td bgcolor="$recordbg"><font face="arial" size="1">$dbrow{'la +stname'},&nbsp;$dbrow{'firstname'}&nbsp;</font>&nbsp;</td> <td bgcolor="$recordbg"><font face="arial" size="1">$dbrow{'of +ficephonenumber'}&nbsp;</font>&nbsp;</td> <td bgcolor="$recordbg"><font face="arial" size="1">$dbrow{'de +scription'}&nbsp;</font>&nbsp;</td> <td bgcolor="$recordbg"><font face="arial" size="1">$company_t +ype&nbsp;</font>&nbsp;</td> <td bgcolor="$recordbg"><font face="arial" size="1">$dbrow{'co +mpany_name'}&nbsp;</font>&nbsp;</td> <td bgcolor="$recordbg"><font face="arial" size="1">$dbrow{'de +tails'}&nbsp;</font>&nbsp;</td> HERE_HTML_ROW print "\n</tr>\n"; } $row++; $count++; } print "\n</table>\n"; my ($visible); if ($count>=$max){ $visible=$max; } else { $visible=$count; } print<<HERE_HTML; <BR><font size="2" face="helvetica"><B>1-$visible of $count records di +splayed</B></font> HERE_HTML # This is the part that's not working because i don't think # that i can do this, please help. if ($row>$max) { print "<font size=2 face=helvetica><a href=\"$ENV{'SCRIPT_NAME'}?$ +ENV{'QUERY_STRING'}&min=100\">Next 100</a></font>\n"; } Thanks, Kiko

In reply to Viewing by Kiko

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.