Re: paging large amounts of data

From: Date: Tue, 23 Aug 2005 15:37:48 +0000
Subject: Re: paging large amounts of data
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20540@lists.php.net to get a copy of this message
On 8/23/2005 5:26 PM, Lukas Smith spake the following words: > Hi, > > its not entirely clear to me how paging of large amounts of data are > going to work. essentially the way things seem to me is that I need to > stick in an array with all the id's of the entire dataset, even if in > the end I am only interested in a small number of all the id's and even > if I am able to specifically extract these ids using LIMIT (or some > equivalent syntax) from the database. > > Is there a way to just pass in a count of the total number of items in > the dataset instead? It does not seem sensible to fake this huge array > either. Off the top of my head... What you do is pass an array of the total number of items, storing merely an ID for each one. When you generate the page, just grab the items you want from the database. Does that sound reasonable? Klaus

« previous php.pear.general (#20540) next »