[PHP3] Re: your mail From: Michael Schwarz (mschwarz <email protected>)
Date: 09/30/98

If you are talking about a web page, what I have generally done it
to put a "hidden" variable (see an HTML reference) in each page that
contains the actual row number first displayed on the current page
(1 or 0 for the first query, 19 or 20 for the next page, etc.). I
actually perform the entire query each time, using only "hidden
variable" plus number of rows displayed for a "next" click and
"hidden variable" minus number of rows displayed for a "previous"
click. Any other solution requires that you store state information
at the server for every "current user" and unless you have some sort
of login or unless you can be sure that you have no multi-user hosts
connecting, there is no effective way of doing this.

For an illustration of what I am talking about, do a "View source"
with your browser on one of these "next 20" search engine pages.
"View source" is very educational. May I also suggest a title like
"Webmaster in a Nutshell" from O'Reilly and Associates?

Good luck!

--
"Pm fvb jhu ylhk aopz, fvb hyl h jyfwav mylhr!"
               - Caesar VII
mikes <email protected>  mschwarz <email protected>
Michael A. Schwarz
PGP 5.0 or 2.6.2 public key available on request

On Wed, 30 Dec 1998, M. N. Khan wrote:

> AA, > Using PHP3 and Postgresql, how does one search a database, and instead of displaying all the records at once, but displaying say 10 records at a time. > EG What you see on search engines - the display about 10 records at a time. > > I think one has to store the IDNum's of all the records in an array and then display the first ten. Then a link at the bottom takes you to the next 10, and so on. > > But how does one implement this!?? > > Any ideas? > Thanx >

-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3