What I want to do is set up a page that can monitor the availability of a piece of plant, i.e. how many hours in a day was a JCB working? I'd like to have a single button that will change the status of the plant (easy) on a page but I'd like to track when the status changed and then be able to calculate the availability for a given period (the bit I'm stuck on).
I'm struggling to think of how I can structure the database and php script to allow me to do this... Any ideas/help greatly appreciated :)