I want to get the last time my database was updated, so I use this query in my PHP code:
$query = mysqli_query($mysqli, "SELECT UPDATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'map_db'
AND TABLE_NAME = ".$objects_tab."");
$lastUpdateTime = mysqli_fetch_array($query);
echo "<div id ='lastUpdate'>".$lastUpdateTime."</div>";
For some reason the query won't work, does anyone know whats the problem?
It works when I do other queries so its not the $mysqli
connect variable or the table name variable that's wrong.