What database are you using, it's pretty easy to do with MySQL, since it
supports the LIMIT clause.  

To find out the number of records from any DB's table, just run a select
count(*) query on it.

Ilya 

-----Original Message-----
From: Purcell, Scott
To: '[EMAIL PROTECTED]'
Sent: 10/2/01 6:36 AM
Subject: Select X number of rows

Hello,
I am a Perl guy, not a DBA. Anyway, if I have a couple of DBs with X
amount
of records, can I select from three databases, acquire the first 20
records
(sort by ASC), then (show them on the web) and when they hit next, show
the
next 20, eg. 21-40 and so on and so on. Also, If that is doable, how do
I
know how many pages. Is there some command in SQL that would tell me how
many records are in the three DBS without me having to acquire and count
all
the records first?

I hope this is not too much of a SQL question, but as I am building this
in
Perl.  I hope I do not offend anyone with this morning off-perl
question.


Thanks you very much,

Scott Purcell

Reply via email to