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

# Product id Product name Product price Product sell price Actions
1 66 Product name 10.00 20.00
2 90000 Doesnt matters 20.00 2.00
3 90001 0.00 0.00
4 azdzd 0.00 0.00
5 ed 0.00 0.00
6 RE RE 0.00 0.00
7 S12_2823 2002 Suzuki XREO 66.27 150.62
8 S12_3148 1969 Corvair Monza 89.14 151.08
9 S12_4473 1957 Chevy Pickup 55.70 118.50
10 S18_1342 1937 Lincoln Berline 60.62 102.74
11 Total - 301.73 Total - 544.94
11 Grand Total- 8874.18
# Product id Product name Product price Product sell price Actions