forked from pods-framework/pods
-
Notifications
You must be signed in to change notification settings - Fork 0
Total_found()
bonsak edited this page Nov 20, 2012
·
1 revision
Fetch the total amount of rows found by the last call to find(), regardless of 'limit' parameter set. This is different than the total number of rows limited by the current call, which you can get with total().
public function total_found ()
(int) Number of rows returned by find(), regardless of the 'limit' parameter
<?php
// Pod is 'rabbits' Pod and it has 8 records
// Let's get 3 items ordered by name
$params = array(
'limit' => 3,
'orderby' => 't.name'
);
$rabbits = pods( 'rabbits', $params );
?>
total_found(): <?php echo $rabbits->total_found(); ?>
total(): <?php echo $rabbits->total(); ?>
The above example will output:
total_found(): 8
total(): 3
2.0+
total_found() is located in /pods/classes/Pods.php