duanbimo7212 2014-05-08 11:26
浏览 145

没有下一个结果集。 请调用mysqli_more_results()/ mysqli :: more_results()来检查是否要调用此函数/方法

I've done below coding using php5.2 and mySql 5. Now I've upgraded my server to support php 5.3 and mySql 5.1.

    do
    {
        if ($this->Result = mysqli_store_result($this->LinkId))
        {
             while ($row = mysqli_fetch_array($this->Result , MYSQLI_ASSOC))
             {
                  $arrRes[] = $row;
             }
             mysqli_free_result($this->Result);
        }
    }while (mysqli_next_result($this->LinkId));

Am getting the following error:

There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method

What should I do?

  • 写回答

1条回答 默认 最新

  • dtmooir3395 2014-05-09 16:35
    关注

    You probably want to do something like this.

    while (true) {
        if ($this->Result = mysqli_store_result($this->LinkId)) {
            while ($row = mysqli_fetch_array($this->Result , MYSQLI_ASSOC)) {
                $arrRes[] = $row;
            }
            mysqli_free_result($this->Result);
        }
        if (mysqli_more_results($this->LinkId)) {
            mysqli_next_result($this->LinkId);
        } else {
            break;
        }
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向