Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Cursors and overhead!!!!!!!!!!!!!!!!!!!111
Date: Aug 31 1999 2:12PM
BAHRI, SOFIENNE writes:
> Hi folks,
> I'm using sybperl to connect to a sybase database. The user fill a form
> and then subit the query to the cgi. the problem i have is that i get so
> much rows(about 1000) and the browser stay a long time to display the
> rows. what i would like to do is to have a buttom (Next)on my page of
> results and each time the user press next he gets for example the 10
> other records displayed in browser.
This is a problem that you always end up having to handle when you
write CGI apps.
The only way to handle this is to do this:
For the first page, set rowcount = 10, and do the select normally.
Remember the primary key of the last row that is displayed.
For the second (and subsequent pages) execute the query with a where
clause that gets records > the last record on the previous page.
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: email@example.com