I want to select a large amount of data from the database, but I can't
use it all at once.  Is there a way to "pick up where I left off" and
get another X rows of data?

For instance, suppose I have the following table in a database :

CREATE TABLE namelist (nameid       INT    UNSIGNED    NOT NULL  
PRIMARY KEY    AUTO_INCREMENT,
                       First_Name   CHAR(50),
                       Last_Name    CHAR(50))

This table has 500 rows.  I want to select the data, order it by last
name, and limit the select to 10 rows at a time.  After I display this
data, I want to be able to go to the next 10 rows ...  Or, perhaps view
the data and select to jump 50 rows ahead ...

My initial thought was to use the nameid field to do this, however, I
cannot since I'm ordering the data.. There is no way to be certain that
the order that comes out keeps the nameid values in order ...

So how is this accomplished?  I see it done all over the place, but I
have no idea how to do this on my own ...

The program that will be doing this is written in perl using the perl
DBI and the mySQL DBD...

Any help would be greatly appreciated...!

-- 
---------------------------
Jason H. Frisvold
Senior ATM Engineer
Penteledata Engineering
[EMAIL PROTECTED]
RedHat Certified - RHCE # 807302349405893
---------------------------
"Something mysterious is formed, born in the silent void. Waiting alone
and unmoving, it is at once still and yet in constant motion. It is the
source of all programs. I do not know its name, so I will call it the
Tao of Programming."

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to