https://blog.csdn.net/zhang197093/article/details/52658665
https://www.ivangabriele.com/2013/12/07/php-how-to-execute-a-mysqli-query-after-a-multi_query/
I just got a problem today : I needed to execute a $mysqli->query() after a $mysqli->multi_query() and it didn’t work. Here is the error I got :
Fatal error: Call to a member function fetch_array() on a non-object in […]
为什么多次使用multi_query只有第一次成功,后面的都失败了
这是因为使用multi_query之后必须释放掉它的查询结果,否则之后的查询都会失败,也就是需要不停调用next_result()直到最后一个结果,如果对查询结果并不关心,可以简单的像这样处理。
|
1 2 3 4 |
while ($mysqli->more_results() && $mysqli->next_result()) { //什么也不做 } |
小明编程![[转]CGI与FastCGI是什么-小明编程](https://images0.cnblogs.com/blog/353089/201408/222132422994681.gif)

![[PHP]windows下php5.4+apache2.2+mysql配制方法-小明编程](http://brightguo.com/wp-content/uploads/2013/05/050113_0438_PHPwindowsp11.png)
![[PHP]使用eaglephp(非PHP程序员的菜鸟使用手册)-小明编程](http://brightguo.com/wp-content/uploads/2013/05/050113_0437_PHPeaglephp13.jpg)



