PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: AGaneshalingam <AGaneshalingam at globewireless dot com>
Subject: RE: displaying limited number of rows
Date: Mar 26 2001 10:29PM

Tks for reply it works for me.

-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Thursday, March 22, 2001 3:48 PM
To: SybPerl Discussion List
Subject: RE: displaying limited number of rows


AGaneshalingam writes:
 > Tks for your reply. Sorry, I didn't describe my question correctly. I
should
 > be able to display 50 rows at a given point. And continue this until I'm
 > done with displaying the all rows...

Ah.

I was wondering if this was what you were looking for...

Well - the short answer is that you can't do what you want (or at
least not easily)

However, you can program things so that you can get the behaviour you
want, by doing something like this:

set rowcount 50
select ... from ... 

In the script, remember the last row, and now, when the user wants the
next page, you do:

select ... from ... where {somekey} > {last value}

and so on.

This works well, but you of course need to have a reasonable key on
which to base your where clause...

Michael


 > 
 > -----Original Message-----
 > From: Leung, Patrick [mailto:patrick.leung@gs.com]
 > Sent: Thursday, March 22, 2001 2:15 PM
 > To: 'AGaneshalingam'
 > Subject: RE: displaying limited number of rows
 > 
 > 
 > have you tried sending the command
 > 
 > set rowcount 50 
 > 
 > to your sql server?
 > 
 > 
 > 
 > -----Original Message-----
 > From: AGaneshalingam [mailto:AGaneshalingam@globewireless.com]
 > Sent: Thursday, March 22, 2001 5:04 PM
 > To: SybPerl Discussion List
 > Subject: displaying limited number of rows
 > 
 > 
 > I'm trying to display ( on the web) 50 rows from a table that has almost
 > 10,000 rows of data....Is this possible with CT-Lib using SybPerl. Please
 > help me.
 > 
 > Tks
 > Anton
 > 

-- 
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com