donglinyi4313 2018-01-09 18:39
浏览 41

在PHP脚本执行期间处理Internet连接崩溃的最佳方法

I have a script that executes multiples inserts in a MySQL Database with PHP PDO. User clicks a button and a insert is done. Button can be clicked one minute later and another insert is done. This can be done until user cliks on button "End Application". What to do when internet connection crashes before user clicks "End Application"? Is it possible to rollback the mysql queries even without internet connection? Thank you.

  • 写回答

1条回答 默认 最新

  • dongxia1390 2018-01-09 21:22
    关注

    If you have an application that can be ended, then it be started as well, which means that you have at least one additional status of the progress of the user;

    I would imagine a table with the various states in which the progress can be

    • started
    • ended
    • deleted (?)

    Then you need a table in which you need to watch the progress of the user, the status and the run which this person currently does; as it is not clear what your application looks like it is difficult to give some hints on this.

    Nevertheless, with a status and a user and a run you can always recover from a break in the internet connection.

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大