I'm starting to use Zend Framework and would like to use a query with limit and offset, as the resultset is rather large. If I use the fetchLatest function (see below), I get 10 rows back. I have two questions about this:
1) If I use the fetchSubset function I get an error (Fatal error: Call to undefined method). I suppose I should import a library or something, but don't know how and what.
2) Is there a better method of using limit and offset than the query() function?
class Countries extends Zend_Db_Table
function fetchLatest($count = 10)
return $this->fetchAll(null, 'id desc', $count);
function fetchSubset($limit = 10, $offset = 0)
$sql = 'select * from countries order by id limit '.$limit.' offset ' . $offset;