Home » HTML » Pager » Bug #3639
perPage not working, returns extra rows
Details
| Submitted | 2005-02-28 15:16 UTC |
|---|---|
| From | bhicks at osc dot uscg dot mil |
| Assigned | quipo |
| Status | Bogus |
| Package | Pager |
| PHP Version | 5.0.3 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2005-02-28 15:16 UTC] bhicks at osc dot uscg dot mil
Description:
------------
I am using Windows XP, PHP 5.0.3 and the latest version of Pager with Oracle 9.2.0.2.
I have my pagerOptions setup like so:
$pagerOptions = Array(
'mode' => 'Sliding',
'delta' => 10,
'perPage' => 6,
);
No matter what I put in for 'perPage' it always returns 6 rows. Always. On the last page it will insert blank rows for any rows less than 6.
Reproduce code:
---------------
From my code:
$page->assign('pageData', Pager_Wrapper_DB($dbh, $sql, $pagerOptions));
From my Smarty template:
<table width="90%" cellspacing="0" cellpadding="2" class="content">
<tr>
<th>LAST NAME</th>
<th>FIRST NAME</th>
<th>EMPLOYEE ID</th>
<th>PROFILE</th>
<th>POSITION</th>
</tr>
{section name=item loop=$pageData}
<tr class="{cycle values="trcol1,trcol2"}">
<td>{$pageData.data[item].SURNAME}</td>
<td>{$pageData.data[item].FIRST_NAME}</td>
<td>{$pageData.data[item].USERID}</td>
<td>{$pageData.data[item].PROFILE}</td>
<td>{$pageData.data[item].POSITION}</td>
</tr>
{/section}
</table>
<br>
<div align="center">
<table width="90%" cellspacing="0" cellpadding="2" class="content">
<tr>
<th class="center">{$pageData.links}</th>
</tr>
</table>