PEAR::Pager, paging records

From: Date: Tue, 25 Jan 2005 19:51:04 +0000
Subject: PEAR::Pager, paging records
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12202@lists.php.net to get a copy of this message
I almost have the thing working. I am using the Pager_Wrapper_DB() using the following: $page->assign('pageData', Pager_Wrapper_DB($dbh, $sql, $pagerOptions)); I am assigning it in the page using: {section name=pager loop=$pageData} <tr class="{cycle values="trcol1,trcol2"}"> <td>{$pageData.data[pager].SURNAME}</td> <td>{$pageData.data[pager].FIRST_NAME}</td> <td>{$pageData.data[pager].USERID}</td> <td>{$pageData.data[pager].PROFILE}</td> <td>{$pageData.data[pager].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> </div> I have two problems and two questions: Problem #1: It is not returning everything it should. If I run the query I get 3 more records than it is paging. The paging is working in both sliding and jumping mode it just isn't returning everything. I have tried setting the "perPage" to diffent levels but nada. Problem #2: The results per page isn't correct either. It is showing six hits per page. I am using the following: $pagerOptions = Array( 'mode' => 'Jumping', 'delta' => 2, 'perPage' => 10, ); Question #1: What options can be passed using $pagerOptions and what does 'delta' do? Question #2: What does $paged_data['page_numbers']; do? I know it is an array but when I put it into a loop like $paged_data['page_links']; the only thing that prints is "Array". So I do not know what it is doing and how to use it. I am using: Oracle 9.2.0.2 PHP 4.3.10 PEAR::DB (latest of the site) Any help would be appreciated... Robert

« previous php.smarty.general (#12202) next »