Problem with pear pager class
| From: | Pete | Date: | Thu, 04 Nov 2004 09:55:09 +0000 |
| Subject: | Problem with pear pager class | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15331@lists.php.net to get a copy of this message | ||
Hi list,
why are only the first 10 results displayed? When I click on the next page there are no results:
if ($cat_id == 21) {
$res =& $db->query("SELECT * FROM links_company ORDER BY name ASC");
while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$row = $page->returnHTMLCompatible($row);
$companies[] = $row;
}
$params = array(
'mode' => 'Jumping',
'altPrev' => 'Zurück',
'prevImg' => 'Zurück',
'nextImg' => 'Vor',
'altNext' => 'Vor',
'perPage' => 10,
'delta' => 5,
'itemData' => $companies);
$pager =& Pager::factory($params);
$companies = $pager->getPageData();
//echo "<pre>";
//print_r($companies);
//echo "</pre>";
$links = $pager->getLinks();
$page->assign('links', $links['all']);
$page->assign('companies', $companies);
$page->display('links_companies.tpl');
# SHOW MAGAZINES
} elseif ...