forked from pods-framework/pods
-
Notifications
You must be signed in to change notification settings - Fork 0
Total()
bonsak edited this page Nov 20, 2012
·
1 revision
Fetch the total row count returned by the last call to find(), based on the 'limit' parameter set. This is different than the total number of rows found in the database, which you can get with total_found().
public function total ()
(int) Number of rows returned by find(), based on the 'limit' parameter set
<?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(); ?>
total_found(): 8
total(): 3
2.0+
total() is located in /pods/classes/Pods.php
See Also