"Niel Zeeman" <[EMAIL PROTECTED]> wrote:
> I'm looking for a way to have a "next 10 records" "previous 10 records"
type
> of sinario, extracting records from a database. Now the only problem is
that
> I want to do it in Interbase. I know mysql has a seek option and a method
> of only returning a segment of records but I'm having no luck in
interbase..
I've never touched Interbase, but here's how I do it in MySQL in general
terms.
1. Get result set.
2. Count number of records in result.
3. Set records per page ( $records_per_page ).
4. Pass page number in query string ( $SCRIPT_URL?page=$page ).
5. Build hyperlinks for previous, next from variables from 2, 3 and 4.
Handle special case of previous or next not being valid based on first or
last page cases.
6. Use SELECT my_fields FROM my_table WHERE where_clause LIMIT $row_start,
$records_per_page to generate records for the web page.
Hopefully it will make sense once you start playing with it.
--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]