Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #3639 perPage not working, returns extra rows
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)    

 [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 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>{$[item].SURNAME}</td> <td>{$[item].FIRST_NAME}</td> <td>{$[item].USERID}</td> <td>{$[item].PROFILE}</td> <td>{$[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>


 [2005-03-02 00:01 UTC] quipo
Before bashing Pager, please tell me what you get *without* using smarty (rule #1: when in trouble, reduce complexity) $res = Pager_Wrapper_DB($dbh, $sql, $pagerOptions); var_dump($res); exit;
 [2005-03-02 15:28 UTC] quipo
Pager_Wrapper works as expected. Please check your Smarty templates.