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 109 entries

# Product id Product name Product price Product sell price Actions
1 S10_1678 1969 Harley Davidson Ultimate Chopper 48.81 95.70
2 S10_1949 1952 Alpine Renault 1300 50.00 214.30
3 S10_2016 1996 Moto Guzzi 1100i 68.99 118.94
4 S10_4698 2003 Harley-Davidson Eagle Drag Bike 91.02 193.66
5 S10_4757 1972 Alfa Romeo GTA 85.68 136.00
6 S10_4962 1962 LanciaA Delta 16V 103.42 147.74
7 S12_1099 1968 Ford Mustang 95.34 194.57
8 S12_1108 2001 Ferrari Enzo 95.59 207.80
9 S12_1666 1958 Setra Bus 77.90 136.67
10 S12_2823 2002 Suzuki XREO 66.27 150.62
11 Total - 783.02 Total - 1596
11 Grand Total- 10993.66
# Product id Product name Product price Product sell price Actions