As TedPride wrote, the usage of LIMIT and/or OFFSET in sql query can help. My experience is that the real implementation very depends on GUI abilities, so I would like to roughly explain my requirement and implementation.
Req:
The user can navigate through very large table. He must be able to move to the first and last (!!!) page, he must know index of current page and he must be able to jump forward and backward not only one page, but also 5, 10, 50, 100, ... pages (to be able to "divide and conquer" when finding something by eyes).
Impl:
The challenge is related with db->program data flow. In PostgreSQL 7.x, which we used via DBI, we are able to use LIMIT and OFFSET, but we are not able to get the total count of rows when LIMIT is used. So I decided to not use LIMIT and let the sql machine construct the all rows (from OFFSET to the end). Hopefully, in that combination of PostgreSQL+DBI I am able to run that query, fetch only 100 rows in one command and get information about total rowcount of this query.
So my html form posts desired index of page (for instance 47th of 112) and my perl subroutine counts proper OFFSET, runs the query, fetches only 100 rows, create some array like (0, 36, 41, 46, 51, 56, 96, 111) which is in HTML interpreted as ('first', -10, -5, 'current', +5, +10, +50, 'last')
A little bit tricky, but it works.

In reply to Re: Browsing a sql table on the web by pajout
in thread Browsing a sql table on the web by BerntB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.