On 4 Jul 2005 04:52:35 -0700,
be*****@coaster.ch wrote:
Is there a way to show in PHP automatic the date when a DB was last
modified?
In MySQL, I've accomplished this by adding a timestamp field to the table and
sorting for the most recent value. In this case, it's called recupdated :
$query = "SELECT DATE_FORMAT(recupdated, '%M %e, %Y %l:%i %p') AS datemod ";
$query .= "FROM myTable ";
$query .= "ORDER BY recupdated DESC LIMIT 1;";
Then just echo datemod.
But I'd be curious to find out if anyone else has an alternative ? As a real
kludge, I suppose you could look at the file system modification time on the
..MYD or .MYI file. But that feels very wrong to me . . .