doujiayuan8415 2015-03-03 06:14
浏览 48
已采纳

如何在db中连续比较当前时间和datetime字段?

I'm am working on an bootstrap website where I have get a list of tasks to do from mysql db which starts on different times of the day. I also have to pop up a reminder when each task is about to start. Table has 4 columns task_id(int), task_name(varchar), start_time(datetime), and details(varchar).

I've managed to get the data from the table and display it in a table in my website,using the mysql_fetch_array loop.

I understand and am using the bootstrap modal to do the pop up of the reminder.

But I'm not sure on how to do the triggering of the pop up, and how to continuously check for tasks which match with the current time, to trigger the pop ups.

Any idea on how I can go about doing this?

  • 写回答

1条回答 默认 最新

  • drgbpq5930 2015-03-03 06:35
    关注

    You can do the check on each page load. And if you expect a user to stay on the same page for a long time, you can setup a timer (setInterval in JS) that will make an ajax request to check if there is a task to display

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.