0

want search result for displaying exactly same result as in : https://www.ippu.purdue.edu/GlobalLinkages/index.cfm?Location=.&Page=search

1 - 25 of 414 records Next >

I am using 3 inputs frm user ant it is same as link provided above

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
  • possible duplicate of [Pagination for PHP search results](http://stackoverflow.com/questions/4244006/pagination-for-php-search-results) – OMG Ponies Feb 01 '11 at 00:31

2 Answers2

1

Use MySQL's LIMIT and OFFSET constructs:

$offset = ($current_page - 1) * $items_per_page;
// in your query:
LIMIT $items_per_page OFFSET $offset
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
1

I'd check out the Pager class in the PEAR repository. It's what I use for this sort of thing, and it has a bunch of options you can set.

barfoon
  • 27,481
  • 26
  • 92
  • 138