开发者

Need to show last time updated data on site

开发者 https://www.devze.com 2023-02-19 04:05 出处:网络
I need to shoe on my website date and time when is data last time updated. Does anybody know where to fin开发者_如何学JAVAdany good looking javascriptcode for this ?proof of concept

I need to shoe on my website date and time when is data last time updated. Does anybody know where to fin开发者_如何学JAVAd any good looking javascript code for this ?


proof of concept

  1. your DB table should have a column like this: last_update TIMESTAMP(8),
  2. retrieve the last updated row with SELECT * FROM table ORDER BY last_update DESC LIMIT 1
  3. make an AJAX request usign Javascript ( maybe using jQuery) and display it,


for that you have to keep tracking your files when it would updates or store datetime in database. not other way to track.

0

精彩评论

暂无评论...
验证码 换一张
取 消