Pagination problem with boolean
I am displaying some records with a boolean checked using the following code.
<?php
$team = new Pod('special_offers');
$sqltxt = 'related_company.active = "1"';
$team->findRecords('id DESC', $sqltxt);
$total_members = $team->getTotalRows();
?>
The problem is that when I include the $sqltext in the findrecords line, pagination stops working.
$team->findRecords('id DESC', $sqltxt);
Any help would be really appreciated as I have hundreds of records and the page is ridiculously long without pagination.
Thanks
2 Answers
You're using the variable in the wrong spot:
$team->findRecords($orderby, $records_per_page, $where)
Put it into the third spot there. The second one defaults to 15.
Thank you very much for the help and quick answer. This worked perfect
$team->findRecords('id DESC', 15, $sqltxt);


