你查一下MySQL的手册,关于mysql_real_connect一段:CLIENT_MULTI_RESULTS Tell the server that the client can handle multiple result sets from multiple-statement executions. This is automatically set if CLIENT_MULTI_STATEMENTS is set. See the note following this table for more information about this flag. Added in MySQL 4.1. If you enable CLIENT_MULTI_STATEMENTS or CLIENT_MULTI_RESULTS, you should process the result for every call to mysql_query() or mysql_real_query() by using a loop that calls mysql_next_result() to determine whether there are more results. For an example, see Section 17.2.9, “C API Handling of Multiple Statement Execution”. 说实话,我也从来没有用过这个flag,所以不知道具体情况。

解决方案 »

  1.   

    比如说一个存储过程返回一个结果资源集,php要接收
      

  2.   

    LZ是不是在应用存储过程的时候出现需要MULTI RESULTS返回...
    在使用存储过程的时候,传统的MYSQL系列函数,没有MYSQLI好用.
      

  3.   

    这应该是在mysql里定义的
    你可以看看mysql手册里的mysql_real_connect()
    CLIENT_MULTI_RESULTS 通知服务器,客户端能够处理来自多语句执行或存储程序的多个结果集。如果设置了CLIENT_MULTI_STATEMENTS,将自动设置它。
    因为php里未予定义该常量,因此需要自己定义。
      

  4.   

    至于为什么是131072如果其他地方查不到可能要去查一下mysql源码里的C API的宏定义了。