I've seen the mySQL example here:How can I tell when a MySQL table was last updated?
But it's not working in mySQLi. I have this function to return the last time a specific table was updated (I am connected via another function that produces $conn), but it's not working. I want to run the function and return a date and time text. Any help is greatly appreciated!
My code:
function getDatabaseUpdateTimes($conn,$databaseName,$tableName){
mysqli_select_db($conn,$databaseName);
$query = "SELECT UPDATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEMA = '$databaseName'
AND TABLE_NAME = '$tableName'";
$updateTime=mysqli_query($conn, $query);
return $updateTime;
}