douyin7829 2013-06-19 13:37
浏览 37
已采纳

PHP - 使用计时器

Hello I want to make a timer of 1 minute and want to execute a mysql query after that.

Can I do this in PHP, without using any javascripts? If yes, how would I do it?

  • 写回答

2条回答 默认 最新

  • douke6857 2013-06-19 16:02
    关注

    It'll be taxing in performance, and a very inefficient way of accomplishing the two-hour restriction on the password recovery check from your other question, which I'm assuming is why you asked. Add a timestamp column to the table (PHP time() function), and when you query the table for password recovery later, if the timestamp column (which will be a time in seconds) is 7200 (the number of seconds in two hours) less than the current timestamp, delete the row. If the difference is less than 7200 seconds, perform the recovery.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大