Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 scrutinizing the Monastery: (7)
As of 2015-07-31 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls