RE: [PHP] LIMIT?
| From: | Albert | Date: | Mon, 06 Feb 2006 15:01:28 +0000 |
| Subject: | RE: [PHP] LIMIT? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229949@lists.php.net to get a copy of this message | ||
William Stokes wrote:
> One page one there's headline and short summary and the second page should
> be "archive" with only the headline so all remaining rows can be printed
> to one page.
>
> Something like: "SELECT * FROM
x_news LIMIT 0 , 15"
> but how to do the
> archive page SELECT * FROM x_news LIMIT 16 , xx?
I've scanned the MySQL Reference Manual (for up to Version 5.0.4-beta) and:
"
To retrieve all rows from a certain offset up to the end of the result set,
you can use some large number for the second parameter. This statement
retrieves all rows from the 96th row to the last:
mysql> SELECT * FROM table LIMIT 95,18446744073709551615;
"
HTH
Albert
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 2006/02/04