Elapsed time from a given time in the database

后端 未结 3 1512
悲哀的现实
悲哀的现实 2021-01-28 14:20

I have a HTML table which has records pulled in from the database. I\'m using PHP/MySQL.

The Column in my table named \"Timer\" is not retrieved from the database. I nee

3条回答
  •  自闭症患者
    2021-01-28 14:30

    You'd want to use PHP to retrieve the time from the database, then use Javascript to display a timer that's counting from the time retrieved. You should be able to find available premade Javascript scripts that can do this quite easily. Here's one I found. I have no idea if it's the best for your needs, but it was amongst the first results. Just snip off the parts not needed, like the year, month, etc.

    http://praveenlobo.com/techblog/javascript-countup-timer/

提交回复
热议问题