How can I calculate a formula based on two or more fields, for example, subtotal=unit_price * quantity?
Let’s assume your table is called “order_data”. In the folder containing the PHPMagic-generated files, look for a file named “order_data_view.php”. Open this file in a text editor. Now, on line 17 of that file, you will see the SQL query used to display the table view. It looks something like this (on a single line): $x->Query = “select item as ‘Item’, unit_price as ‘Unit price’, qty as ‘Quantity’ from order_data”; All you need to do is modify the query to something like this (on a single line): $x->Query = “select item as ‘Item’, unit_price as ‘Unit price’, qty as ‘Quantity’, unit_price * qty as ‘Subtotal’ from order_data”; Then save the changes and upload the file to your web server.