Sum per page Display sum per page and Grand sum (added in v 1.9)

You can use sum per page function to display sum of any columns values of that page and sum total function to display grand total. Please note that these function display values dynamically on crud table only.

  
                            $pdocrud = new PDOCrud();
                            $pdocrud->crudTableCol(array("product_id","product_name","product_price","product_sell_price"));
                            $pdocrud->colSumPerPage("product_price");
                            $pdocrud->colSumPerPage("product_sell_price");
                            $pdocrud->colSumTotal("product_sell_price");
                            echo $pdocrud->dbTable("products")->render();
                        

Products

Showing 1 to 10 of 102 entries

# Product id Product name Product price Product sell price Actions
1 S12_1108 2001 Ferrari Enzo 95.59 207.80
2 S12_1666 1958 Setra Bus 77.90 136.67
3 S12_3148 1969 Corvair Monza 89.14 151.08
4 S12_3380 1968 Dodge Charger 75.16 117.44
5 S12_3891 1969 Ford Falcon 83.05 173.02
6 S12_3990 1970 Plymouth Hemi Cuda 31.92 79.80
7 S12_4473 1957 Chevy Pickup 55.70 118.50
8 S12_4675 1969 Dodge Charger 58.73 115.16
9 S18_1097 1940 Ford Pickup Truck 58.33 116.67
10 S18_1129 1993 Mazda RX-7 83.51 141.54
11 Total - 709.03 Total - 1357.68
11 Grand Total- 9936.13
# Product id Product name Product price Product sell price Actions