You need to do a count before your select, use limmit to only select a set
number of records. That way you can work out how many pages there are and
just have a link. You run the same query for each page except that the start
record for the "limit" is the pagenumber * number of records per page.

----- Original Message ----- 
From: "Jesse Sheidlower" <[EMAIL PROTECTED]>
To: "Mike Blezien" <[EMAIL PROTECTED]>
Cc: "MySQL List" <[EMAIL PROTECTED]>
Sent: Thursday, November 13, 2003 4:41 PM
Subject: Re: Page Numbers


: On Wed, Nov 12, 2003 at 08:10:58PM -0600, Mike Blezien wrote:
: > Hello,
: >
: > we've set up many displays using the "Previous" and "Next" simple
linking
: > set up of search results. But now would like to implement the page
number
: > style, IE. "Previous" [1] [2] [3] "Next" style format and was hoping
: > someone may have a sample/example queries to accomplish this. Usually
: > working with 10 results per page display.
:
: Paul DuBois provides easy-to-understand code for this exact format
: in _MySQL and Perl for the Web,_ and his _MySQL Cookbook._
:
: Jesse Sheidlower
:
: -- 
: MySQL General Mailing List
: For list archives: http://lists.mysql.com/mysql
: To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
:
:


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to