Hi all, I am new to web development and I am suffering from a problem to get the date and time when the mysql database table was updated because I have to show it on my web page. I get the latest updated date correctly, but not correctly, please help me.
<?php
$sql = "SHOW TABLE STATUS FROM MydatabaseName LIKE 'TableName'";
$tableStatus = mysql_query($sql);
while ($array = mysql_fetch_array($tableStatus)) {
$updatetime = $array['Update_time'];
$datetime = new DateTime($updatetime);
echo $updatetime ;
}
?>
source
share