Change the number of rows a list transaction displays [message #1672] |
Wed, 17 September 2008 23:29 |
jsmeaton
Messages: 9 Registered: May 2008
|
Junior Member |
|
|
Hi Tony,
I want to be able to change the number of rows displayed for a list1 transaction (actually, all transactions but I'm focusing on that for now) based on a session variable that I've implemented.
I've tried placing the session switch within the list1 transaction but that doesn't seem to work. It still displays the default 10 rows.
The following is the code in the list1 transaction:
// get pagination details
$pagination['main']['numrows'] = $dbobject->getNumRows();
$pagination['main']['curpage'] = $dbobject->getPageNo();
$pagination['main']['lastpage'] = $dbobject->getLastPage();
//Set rows per page to huge amount to remove pagination from offline mode
if (isset($_SESSION['standalone'])) {
if ($_SESSION['standalone'] == true) {
$dbobject->setRowsPerPage(20000);
$pagination['main']['numrows'] = 20000;
$pagination['main']['curpage'] = 1;
$pagination['main']['lastpage'] = 1;
}
}
the "// get pagination details" and the following expressions are written by you. Everything under that is done by me. The setRowsPerPage is not doing what I need it to do. Should I be trying to do this in another section? Thanks for you help.
|
|
|