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

后端 未结 16 1806
忘了有多久
忘了有多久 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:40

    I would create a trigger that catches all updates/inserts/deletes and write timestamp in custom table, something like tablename | timestamp

    Just because I don't like the idea to read internal system tables of db server directly

提交回复
热议问题