dpndp64206
2011-02-28 08:08
浏览 181
已采纳

如何在PHP中异步执行MySQL存储过程

I would like to execute a stored procedure, and return immediately back to the script, and the SP shall run in the background until complete, and should not be killed by the PHP process.

How can this be done in PHP?

图片转代码服务由CSDN问答提供 功能建议

我想执行一个存储过程,然后立即返回脚本,SP将在 背景,直到完成,不应该被PHP进程杀死。

如何在PHP中完成?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • douxi1968 2011-02-28 08:28
    已采纳

    I believe you can make it work by using mysql events. I haven't tried personally, but it seems like what you are looking for.

    已采纳该答案
    评论
    解决 无用
    打赏 举报
  • dpp80346 2011-02-28 08:18

    You could trigger the execution of a separate PHP script that would run asynchronously (and execute the stored procedure~)

    Asynchronous PHP

    评论
    解决 无用
    打赏 举报