Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating "next 10" behaviour

Status
Not open for further replies.

Microbe

Programmer
Oct 16, 2000
607
AU
Writing an app that will display a heap of records.

I am pulling a bunch of records out of the DB and want to display them 10 at a time with a "next 10" and "previous 10" link. I note the way Macromedia has links "1-10" "10-20" etc, rather than "next" and "previous". Perhaps that is an easier way to do it.

The main issue is that they are ordered by something other than the primary key, so navigating the recorset is not as easy as just grabbing the ID and moving the cursor.

Any suggestions on the best way to do this or any script samples?

THanks in advance.

Steve

Steve Davis
hey.you@hahaha.com.au
 
You can keep the first record value and the last record value in the query string. That way you can use the Select TOP 10 * from TABLENAME where Value > last record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top