Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Answer: How to display from X to Y records using DBI?

( #9843=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > How can I retrieve records X to Y using DBI? contributed by btrott

I'll expand on what chromatic wrote, because the LIMIT keyword can do even more than just that. :) In addition to specifying the max number of records to return, you can specify an offset of where to start in the records being returned. The syntax is
[LIMIT [offset,] rows]
So, for example, to view records 10-35, do this:
select log_id from log_id limit 10,25
Pretty neat! Consult the MySQL SELECT docs for more details and tips.

Comment on Answer: How to display from X to Y records using DBI?
Select or Download Code
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-08-28 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (255 votes), past polls