且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP MySQL 多语句适用于我的网页,但不适用于 XAMPP

更新时间:2023-02-23 15:47:38

根据 PHP 手册,mysql_query 不支持多查询.然而,在评论中有一个人说这是可能的:

According to the PHP manual, mysql_query does not support multiple queries. However, in the comments there's a guy stating that it it possible:

但是,似乎支持多个查询.您只需将标志 65536 作为 mysql_connect 的 5 参数(client_flags)传递.(来源)

However, multiple queries seem to be supported. You just have to pass flag 65536 as mysql_connect's 5 parameter (client_flags). (Source)

另一方面,手册只提到了函数的两个参数,所以我想知道如果第 5 个参数真的起作用,我们应该将什么作为第 3 个和第 4 个参数传递!

On the other hand, manual only mentions two parameters to the function, so I wonder what we are supposed to pass as the 3rd and 4th parameters if that 5th one really does the trick!