I needed the standard SQL option for TIMESTAMP. To have a "last_update" column where column type DateTime is automatically saved whenever the row was created or modified.
It's not included in the built-in features of the plugin, but there's a workaround:
1. Create a column (for example "Updated") in your table
2. In column settings set the type to be "DateTime" (in the "Data" tab), and in the "Editing" tab set the "Editor Input Type" to "none".
3. In the database, run this query:
ALTER TABLE `table_name` CHANGE `updated` `updated` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Please note that you need to replace 'table_name' with the actual database table name. You can find the database name of the table in the Editing tab above the table, in the "MySQL query name for editing" field.
Hello,
I needed the standard SQL option for TIMESTAMP. To have a "last_update" column where column type DateTime is automatically saved whenever the row was created or modified.
Regards,
Dusan
Hello Dusan.
Thank you for your purchase.
It's not included in the built-in features of the plugin, but there's a workaround:
1. Create a column (for example "Updated") in your table
2. In column settings set the type to be "DateTime" (in the "Data" tab), and in the "Editing" tab set the "Editor Input Type" to "none".
3. In the database, run this query:
Please note that you need to replace 'table_name' with the actual database table name. You can find the database name of the table in the Editing tab above the table, in the "MySQL query name for editing" field.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables