How can I show the last modified date, when my Mysql-database was updated?
(I know there is plugin for showing latest modified date for post/pages, I want to do similar, but show when fields/metadata was updated)
Thankful for answers"
How can I show the last modified date, when my Mysql-database was updated?
(I know there is plugin for showing latest modified date for post/pages, I want to do similar, but show when fields/metadata was updated)
Thankful for answers"
Ok, solved it.
<?php
global $wpdb;
$result = $wpdb->get_results("SHOW TABLE STATUS FROM database_name LIKE 'table_name';");
foreach ($result as $data) {
$updatetime = $data->Update_time;
}
$date = substr($updatetime, 0, -3);
echo $date;
?>