Add new table column
Message :
Products
Showing 1 to 5 of 107 entries

You can add new table column dynamically based on two columns value for example you want to show order total based on order sub total and tax. You can also merge two columns to generate a new column for example you can merge first name and last name to generate new column "Full Name". By default, new column is added at the last. Since it is dynamic column, so it doesn't support search/sort/export function.
$pdocrud = new PDOCrud(); //Add new column total which is calculated as sum of two columns (you can pass any no. of columns) $pdocrud->tableColAddition("Total", "sum",array("product_sell_price","tax")); //Add new colum Profit which is calculated as subtraction of two columns $pdocrud->tableColAddition("Profit", "subtract",array("product_price","product_sell_price")); //Add new colum Sell/price which is calculated as division of two columns $pdocrud->tableColAddition("Sell/price", "divide",array("product_sell_price","product_price")); //Merge column to generate a new column ( you can pass any no. of columns) $pdocrud->tableColAddition("Product Info", "merge",array("product_id","product_name")); $pdocrud->crudTableCol(array("product_name","product_id", "product_price","product_sell_price","tax","product_discount")); $pdocrud->crudRemoveCol(array("product_name","product_id")); echo $pdocrud->dbTable("products")->render();