Hi all
Noob here!
I am busy writing a web app that posts fuel usage data into a MySQL DB.
Some records get added into the DB on the day that the vehicle leave the site. This will include the 'OpenKM' field. On the return of the vehicle the 'CloseKM' gets updated (added) into the record. I would like to have 'Consump' field to contain (CloseKM-OpenKM)/(MillDiesel+OutDiesel)
I am trying to figure out SQL Triggers, is that what I need to use to have this working?
Any help would be greatly appreciated.