Move up one page in SELECT results

Results 1 to 2 of 2

Thread: Move up one page in SELECT results

  1. #1
    Join Date
    Dec 1969

    Default Move up one page in SELECT results

    I&#039;d like to have any help from you...<BR>After SELECT&#039;ing a bunch of records from the database, I show the first 25, and a button to move down to the next 25 records, and so on.<BR>My problem is how to move up... I could read all records from start then check for the first record just shown, then MoveBack 25 records and display the 25 starting from this one. This works... But I suppose that&#039;s not the best way.<BR>Can anyone tell me any sample of how can I do that?<BR><BR>Thanks for any help you can provide me.<BR><BR>Fernando

  2. #2
    Join Date
    Dec 1969

    Default RE: Move up one page in SELECT results

    There are various methods used to "paginate" the results, and some depend on the DBMS you are using.<BR><BR>For example, MySQL lets you use "TOP" and "OFFSET" to achieve this 100% in a single SQL Query. With SQL Server you may decide to use a stored procedure, or a temporary table. You may even decide to cache different iterations of your data in a temporary table or view to improve performance.<BR><BR>I suggest you Google for some really good tutorials on pagination.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts