Displaying next ten items
| From: | PHP) | Date: | Fri, 29 Dec 2006 00:22:06 +0000 |
| Subject: | Displaying next ten items | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-42861@lists.php.net to get a copy of this message | ||
I am wondering what the mySQL commands are to display the next 10
records / previous 10 records.
I am wondering how you pass a variable through a PHP script so the
script knows which next or previous 10 entries to display. (Especially
since this is all variable driven) Would you do something like ?next=21
and ?previous=1 as part of the URL link to know where your query should
begin? I do know the LIMIT = mySQL command to limit 10 items to be
displayed.
How do you tell when there aren't 10 more entries left to display? IE
If there are 46 records in a table and you are displaying 40 to 46 you
don't want to offer a link to display records 50 to 59.
Ron