if ($max !== null) {
$stories = $this->getStories(
array('channel_id' => $channel_id,
- 'published' => true),
+ 'published' => true,
+ 'startnumber' => $from,
+ 'limit' => $max),
$order);
} else {
$stories = $this->getStories(array('channel_id' => $channel_id,
Horde::logMessage('SQL Query by Jonah_Driver_sql::_getStories(): ' . $sql, 'DEBUG');
if ($limit || $start != 0) {
$results = array();
- $rows = $this->_db->limitQuery($sql, $start, $limit, $values );
+ $rows = $this->_db->limitQuery($sql, $start, $limit, $values);
while ($rows->fetchInto($row, DB_FETCHMODE_ASSOC)) {
$results[] = $row;
}