I have a database which stores the work my staff do. One particular query I run tells me how much money I owe them for the current month (month to date), based on the hours that I have recorded for them. However, I would like to store this information into a table itself, for various reasons, not least to record whether I have actually paid them for this.
I would like my system to automatically run this query on the last day of the month and input its values into the payments table. My system is using php & mysql.