Alex Rivera | Logout

How can I tell when a MySQL table was last updated?

Asked 2008-11-21T00:48:59.003
223

In the footer of my page, I would like to add something like "last updated the xx/xx/200x" with this date being the last time a certain mySQL table has been updated.

What is the best way to do that? Is there a function to retrieve the last updated date? Should I access to the database every time I need this value?

Edit
Report

1 Answer

-9

Cache the query in a global variable when it is not available.

Create a webpage to force the cache to be reloaded when you update it.

Add a call to the reloading page into your deployment scripts.

answered 2008-11-21T00:56:48.643

Your Answer