Home > Backend Development > PHP Tutorial > php 如何异步插入数据库

php 如何异步插入数据库

WBOY
Release: 2016-06-06 20:50:38
Original
1785 people have browsed it

<?php $key='123';
{这边把key 入库}
echo $key;
?>
Copy after login
Copy after login

上面异步操作数据库,不要数据库操作完返回,就直接echo $key?

回复内容:

<?php $key='123';
{这边把key 入库}
echo $key;
?>
Copy after login
Copy after login

上面异步操作数据库,不要数据库操作完返回,就直接echo $key?

http://php.net/manual/en/mysqli.reap-...

这个?不过需要原生的mysqlnd驱动

我不知道题主希望的“异步”具体目的是什么。
某种意义上,mysql 的 INSERT DELAYED 也算是 异步的一种吧?
参考链接:https://dev.mysql.com/doc/refman/5.5/...

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template