I am sure the answer to this is very simple and it has been asked a hundred times. I am completely new to PHP and MySql but am learning slowly. I have a table which is used to enter expenses. There are two fields expenses.Cost and expenses.Quantity.
What I would like to do is to get a total from these fields on adding a record and place it into a field in the same table called logically enough expense_total.
Is this possible and if so how would I go about doing it. I have used PHPmaker which allows me to do something similar to this within a custom view, by using a select statement as follows expenses.Cost * expenses.Quantity AS extended; which creates a display field.
This obviously does not put the value into expense_total but does display the value which can then be totalled.
Any help would be very much appreciated as I really like the flexibility of PHPrunner over PHPmaker in the use of custom HTML and template modification which is not easy within phpmaker.
Sorry if this is a repeat or is so obvious that I should be shot.
Thanks Azz