Pagination problem with boolean

0

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

asked Sep 24 '10 at 1:58

inspiration

7

add comment
enter at least 15 characters

2 Answers

0

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.

answered Sep 24 '10 at 2:41

sc0ttkclark

2936

add comment
enter at least 15 characters
0

Thank you very much for the help and quick answer. This worked perfect

$team->findRecords('id DESC', 15, $sqltxt);

answered Sep 24 '10 at 3:44

inspiration

7

add comment
enter at least 15 characters