How to send a SQL query to database in PHP without waiting for result

前端 未结 3 676
小鲜肉
小鲜肉 2021-01-27 08:20

Working with DB2 and PHP, my ADDs and DROPs take a long time to finish (30 seconds per ADD and DROP). I am curious if there is a way to send my ADDs and DROPs to the database w

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-27 08:31

    I'm fairly certain that most php db controls don't have async methods (too bad). Presuming that you just need to do DB statements that don't interact with the end user you could use pcntl_fork. If you need something else, a solution like this may be more useful.

提交回复
热议问题