简体   繁体   English

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

[英]How to execute a MySQL Stored Procedure asynchronously in PHP

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. 我想执行一个存储过程,并立即返回到脚本,并且SP将在后台运行直至完成,并且不应被PHP进程杀死。

How can this be done in PHP? 如何在PHP中完成?

I believe you can make it work by using mysql events . 我相信您可以通过使用mysql 事件使其工作。 I haven't tried personally, but it seems like what you are looking for. 我没有亲自尝试过,但似乎您正在寻找什么。

You could trigger the execution of a separate PHP script that would run asynchronously (and execute the stored procedure~) 您可以触发一个单独的PHP脚本的执行,该脚本将异步运行(并执行存储过程〜)

Asynchronous PHP 异步PHP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM