How to setup a last update date field in MySQL table to record last update in JS Datatable? Already setup a field lastupdate default current_timestamp on update current_timestamp but not working in JS datatable.
Already setup a field lastupdate default current_timestamp on update current_timestamp but not working in JS datatable.
How can a database field (backend) not work at the frontend? What do you mean by this?
I use this all the time and it works like a charm. You can use a renderer at the frontend or backend to display it like this for example. With the right plugin you can even order the column ascending or descending (in this case it is descending).
Perhaps if you could show us the code you are using, that would help us. If you are submitting the last update value for example, then MySQL won't update the value to the current_timestamp. It only does that if you don't submit a value.
If you are submitting the last update value for example, then MySQL won't update the value to the current_timestamp.
You can achieve correct updating of the timestamp like this for example. update_time is "current time_stamp, on update current time_stamp". I also save the creator_id and the id of the last updater.
Replies
How to setup a last update date field in MySQL table to record last update in JS Datatable? Already setup a field lastupdate default current_timestamp on update current_timestamp but not working in JS datatable.
How can a database field (backend) not work at the frontend? What do you mean by this?
I use this all the time and it works like a charm. You can use a renderer at the frontend or backend to display it like this for example. With the right plugin you can even order the column ascending or descending (in this case it is descending).
Perhaps if you could show us the code you are using, that would help us. If you are submitting the last update value for example, then MySQL won't update the value to the current_timestamp. It only does that if you don't submit a value.
Allan
You can achieve correct updating of the timestamp like this for example. update_time is "current time_stamp, on update current time_stamp". I also save the creator_id and the id of the last updater.
I did it. Thank you all so much.