I have a mysql table with several columns : id, starttime (timestamp), endtime (timestamp), status.
I would like to add triggers to :
- automatically set the timestamp to the 'starttime' field when a new entry is created
- automatically set the timestamp to the 'endtime' field when the corresponding line 'status' is set to "CLOSED"
Newbie in mysql, I have difficulties declaring these triggers...
Thank you for your help,