|
|
sybperl-l Archive
Up Prev Next
From: "BAHRI, SOFIENNE" <sofienne dot bahri at bell dot ca>
Subject: QUESTION!!!!!!!!!!!!
Date: Sep 2 1999 5:18PM
Hi folks,
my question is when i dispaly a page containing 10 records. I have to
dispaly a Buttom named Next(to dispaly the next 10 records). But the
buttom is in javascript. how i can call again the query from a java
code.
a part of my perl script looks like this:
$dbh->ct_cursor(CS_CURSOR_CLOSE, undef, undef, CS_DEALLOC) == CS_SUCCEED
|| die;
$dbh->ct_send;
print
$q->button(-name=>'next',-value=>'Suivant',-onClick=>"&Next_page");
print $q->end_html;
print "deuxieme set";
Next_page;/perl function
}#Fin while ct_results
Michael Peppler wrote:
>
> 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
> --
--
-----------------------------------------------------------
Sofienne Bahri Bell Canada
Directeur-CSR
700,De la Gauchetière O., RC Mezz, Montréal (PQ) H3B-4L1
Téléphone :+1 514 391 4114
Pagette :+1 514 801 2186
Email :sofienne.bahri@ bell.ca
-----------------------------------------------------------
|