Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Viewing

by Speedfreak (Sexton)
on Aug 17, 2000 at 12:00 UTC ( #28281=note: print w/replies, xml ) Need Help??


in reply to Viewing

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://28281]
help
Chatterbox?
and the web crawler heard nothing...

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







    Results (89 votes). Check out past polls.

    Notices?