// get the timestamp of most recent DB update
function tm_update_time() {
global $tmdb;
global $tmdbname;
$sql_command = "SELECT create_time FROM information_schema.tables WHERE TABLE_SCHEMA = '".$tmdbname."' ORDER BY create_time DESC;";
global $tmsqldebug;
if ($tmsqldebug) {
echo "<!-- SQL: ".$sql_command." -->\n";
}
$res = tmdb_query($sql_command);
$row = $res->fetch_assoc();
$ans = $row['create_time'];
$res->free();
return $ans;
}
mysql> SELECT create_time FROM information_schema.tables WHERE TABLE_SCHEMA = 'TravelMapping' ORDER BY create_time DESC;
+---------------------+
| CREATE_TIME |
+---------------------+
| 2019-07-09 10:52:07 |
| 2019-07-09 10:52:07 |
| 2019-07-09 10:52:06 |
| 2019-07-09 10:52:06 |
| 2019-07-09 10:52:05 |
| 2019-07-09 10:51:57 |
| 2019-07-09 10:51:51 |
| 2019-07-09 10:51:49 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:50:42 |
| 2019-07-09 10:50:16 |
| 2019-07-09 10:50:14 |
| 2019-07-09 10:49:51 |
| 2019-07-09 10:49:49 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
+---------------------+
21 rows in set (0.00 sec)
I'm not sure what's happening.