Warning: include(../../script/pdocrud.php): Failed to open stream: No such file or directory in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/table-col-formula-formatting.php on line 1

Warning: include(../../script/pdocrud.php): Failed to open stream: No such file or directory in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/table-col-formula-formatting.php on line 1

Warning: include(): Failed opening '../../script/pdocrud.php' for inclusion (include_path='.:/opt/remi/php81/root/usr/share/pear:/opt/remi/php81/root/usr/share/php:/usr/share/pear:/usr/share/php') in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/table-col-formula-formatting.php on line 1
PDOCrud - CRUD application generator for PHP and Mysql, Pgsql and Sqlite database.

Formula based Formatting of CRUD table column Format crud table column using formula

You can format table column using various formula functions. For example you can make any table column content to uppercase, first letter uppercase, lowercase or you can add prefix, suffix etc.

  
                               $pdocrud = new PDOCrud();
                                // format field to 2 decimal point
                               $pdocrud->tableColFormatting("tax", "formula",array("type" =>"round","decimalpoint"=>2));
                               // format field to 2 decimal point
                               $pdocrud->tableColFormatting("product_discount", "formula",array("type" =>"number_format","decimalpoint"=>2));
                               // get ceil value of field
                               $pdocrud->tableColFormatting("product_price", "formula",array("type" =>"ceil"));
                               //get floor value of field
                               $pdocrud->tableColFormatting("product_sell_price", "formula",array("type" =>"floor"));

                               $pdocrud->crudTableCol(array("product_name", "product_price","product_sell_price","tax","product_discount"));
                               echo $pdocrud->dbTable("products")->render();
                            

Formula based table content formatting


Fatal error: Uncaught Error: Class "PDOCrud" not found in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/table-col-formula-formatting.php:59 Stack trace: #0 {main} thrown in /var/sentora/hostdata/digjainwi/public_html/allsanginfodev/demo/pages/table-col-formula-formatting.php on line 59