Re: Pagination
| From: | pavel | Date: | Thu, 24 Mar 2005 21:55:01 +0000 |
| Subject: | Re: Pagination | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211526@lists.php.net to get a copy of this message | ||
> I am wanting to paginate records from a MySQL Database.
> I want there to be 5 records on a page, on multiple pages.
example for selecting page of records from mysql table:
$sql=sprintf("
SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT %d, %d",
$position*$records,
$records
);
after get count of all records:
$sql='SELECT FOUND_ROWS()';
> (I would like there to be a "next" and "previous.")
you can use http://pear.php.net/package/Pager
--
Pavel Vrany
http://ogi.cz/