Return to Snippet

Revision: 43507
at March 25, 2011 06:54 by Onfire60

Initial Code

// load view object (has no results yet)
$view = views_get_current_view();

// execute view query
$total =0;
foreach ( $view->result as $k=> $v ) {
$total += $v->node_data_field_paymen_total_value;

// results are now stored as an array in $view->result
$count = count( $view->result );

print "Total Number of Payments :  <b>$count</b><br />";
Print "Total Payments :$<b>$total</b> ";

Initial URL

Initial Description
Found This Code to make a stats page view for a client. Make Sure your header input format is PHP.

Initial Title
Drupal 6 - Row Count in Views Header

Initial Tags

Initial Language