Re: Re: Limited db paging with datagrid

From: Date: Wed, 05 Jan 2005 01:47:54 +0000
Subject: Re: Re: Limited db paging with datagrid
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16609@lists.php.net to get a copy of this message
> > $result = $db->query("SELECT COUNT(*) AS count FROM users"); > $record = $result->fetchRow(); > > $result = $db->query("SELECT * FROM users LIMIT 20"); > $dg->bind($result); > > $dg->pager->_totalItems = $record['count']; > > > And if you don't like any of these ideas, just create your own paging > based on a count query. > > Hope this helps and let me know what your solution is It also seems that DataGrid doesnt work with MDB ? using this $data = Structures_DataGrid_DataSource::create($result); Is there a way to get it to work with MDB , possibly via DataObject ? Does ti really need to go into aDataObject though ?

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