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

后端 未结 16 1865
忘了有多久
忘了有多久 2020-11-22 17:17

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.

16条回答
  •  天命终不由人
    2020-11-22 17:44

    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.

提交回复
热议问题