Page 1 of 1

Best way to do multiple page search results

Posted: Thu Jul 03, 2003 4:32 pm
by slimsam1
Let's say I have a rather large database, with many rows, and let's say that searching can yeild up to 200 results. How should I go about splitting these results into different pages, and have a list of page numbers?

example:

186 results for "Blue". Viewing page 3 of 5.
<-- previous ( 1 2 3 4 5 ) next -->

I've managed to do the previous and next page links, and it works great.... but with a large database, it can get slow because it does the query all over again, only printing the results for the page being viewed.

Ideas?

Posted: Fri Jul 04, 2003 2:30 am
by cactus
This should give you a start:

Ref : http://www.devshed.com/Server_Side/PHP/ ... page1.html