Re: Pager_Wrapper?

From: Date: Wed, 22 Mar 2006 20:19:38 +0000
Subject: Re: Pager_Wrapper?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23403@lists.php.net to get a copy of this message
Hugo W. Alves wrote: > Thanks for your atention Oliver! Well, I wanna to use Pager_Wrapper.php why this code performs > a smarty pagination using Pager Package with query results. I wanna means that it performs a query > limit for each page instead of all result, you know? Indeed, I know... Who would ever want to load 1000 rows only to display 10 ? Two drivers currently support SQL LIMIT'ing : dataobject and dbquery. So you can either do : $datagrid->bind($dataobject); where $dataobject is a DB_DataObject instance Or, with Mark's great DBQuery driver, you can do : $options['dsn'] = <your dsn> $query = "SELECT * FROM table"; $datagrid->bind($query, $options); The DBQuery driver rewrites the query in a very similar way to Pager_Wrapper. However this driver is only available in CVS. But I don't see why you shouldn't use it, the CVS works ok. If you prefere to stick with the latest release (0.6.3) then you should use the dataobject driver which has been there for a long time and is quite reliable. Regards, -- og

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