Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hejsan

This was asked before and a good answer was given but I cant remember the author so you'll have to search it.

The proposed solutions was how I would of done it - do it via SQL.

You can use the LIMIT keyword to show a subset of the data returned. For example:

SELECT * FROM mydata LIMIT 100,100;

Here, it tells it to show from the 100th record (1st number) and only 100 records (2nd).

I would approach it by making your "next" link append the next number for limit. Pseudo code may look something like:

my $blocksize = 100; my $limit = 1 + param("limit"); #get the value from the query stri +ng my $sql = "SELECT * FROM data LIMIT $limit,$blocksize;"
Then your next and back buttons may have links like:
showdata.pl?limit=200
showdate.pl?limit=0

Add garnish as desired...

- Jed


In reply to Re: Viewing by Speedfreak
in thread 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2021-10-20 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (79 votes). Check out past polls.

    Notices?