Re: RV: [PHP] LIMIT() function example
| From: | John Nichel | Date: | Thu, 17 Oct 2002 21:27:51 +0000 |
| Subject: | Re: RV: [PHP] LIMIT() function example | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120404@lists.php.net to get a copy of this message | ||
Ya beat me to it. :)
1LT John W. Holmes wrote:
Remember the second number is the number of results to return. So your first query is returning 10 rows, you second is returning 20. ---John Holmes...and example query would be like: select article_id, article_title from articles limit 0, 10; This would give you results from 0 - 10. So you can then do a query on page 2 like: select article_id, article_title from articles limit 11, 20;limit 11, 20 is wrong! You miss one record. You should use "limit 10, 20".