Re: Page per page

From: Date: Tue, 25 Feb 2003 01:30:20 +0000
Subject: Re: Page per page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137015@lists.php.net to get a copy of this message
> Anyone has a good example to build a system that show X records per page and > give links to next and previous pages? I know MySQL has a 'LIMIT x, y' you can tack onto the end of a query (I'm guessing this goes the same for any other SQL db?). From how I've seen this work, 'x' is the start number and 'y' is how many to list. For example, if you have 'LIMIT 0, 30' it says to start with record 0 & list up to 30 records. The next page would be 'LIMIT 30, 30', the page after would be 'LIMIT 60, 30', etc. I know this is more of a SQL answer & doesn't solve the problem of having the code written, but I figured this small part out from phpMyAdmin. Now there's plenty of code & it definately lists X records per page & has links for next & previous :) Patrick

« previous php.general (#137015) next »