Re: paging large amounts of data
| From: | Lukas Smith | Date: | Tue, 23 Aug 2005 16:45:51 +0000 |
| Subject: | Re: paging large amounts of data | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20546@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
No, you don't need to pass in all of the data. See Structures/DataGrid/Renderer/HTMLTable.php for an example of a pager with no data. Basically you just need to pass in 'totalItems'.ok cool .. acutally i just discoovered its not that clear immediatly what the relevant id's are that i need to fetch. is there an API call that will give me the offset that I need to use? just to make it clear again what I want to do: // 1 create pager instance // 2 pass in all the options // 3 fetch total number of items // 4 pass in the total number of items and the selected page id // 5 get the numbers of the pages that pager needs to generate the link list // 6 fetch the id's of these pages // 7 pass id's to pager the trick in the step 6 is that the range is not really fixed. depending on the mode things will require a different offset and maybe even limit. regards, Lukas