久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='RZAEP'></small><noframes id='RZAEP'>

  • <legend id='RZAEP'><style id='RZAEP'><dir id='RZAEP'><q id='RZAEP'></q></dir></style></legend>
      • <bdo id='RZAEP'></bdo><ul id='RZAEP'></ul>

      1. <tfoot id='RZAEP'></tfoot>
      2. <i id='RZAEP'><tr id='RZAEP'><dt id='RZAEP'><q id='RZAEP'><span id='RZAEP'><b id='RZAEP'><form id='RZAEP'><ins id='RZAEP'></ins><ul id='RZAEP'></ul><sub id='RZAEP'></sub></form><legend id='RZAEP'></legend><bdo id='RZAEP'><pre id='RZAEP'><center id='RZAEP'></center></pre></bdo></b><th id='RZAEP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RZAEP'><tfoot id='RZAEP'></tfoot><dl id='RZAEP'><fieldset id='RZAEP'></fieldset></dl></div>

        PHP:“命令不同步"如果我在調用結果存儲過程

        PHP: #171;Commands out of sync#187; if I mysqli::query() again after a call to a results-giving stored procedure(PHP:“命令不同步如果我在調用結果存儲過程后再次使用 mysqli::query()) - IT屋-程序員軟件開發技術分享
        <i id='7Vt2m'><tr id='7Vt2m'><dt id='7Vt2m'><q id='7Vt2m'><span id='7Vt2m'><b id='7Vt2m'><form id='7Vt2m'><ins id='7Vt2m'></ins><ul id='7Vt2m'></ul><sub id='7Vt2m'></sub></form><legend id='7Vt2m'></legend><bdo id='7Vt2m'><pre id='7Vt2m'><center id='7Vt2m'></center></pre></bdo></b><th id='7Vt2m'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7Vt2m'><tfoot id='7Vt2m'></tfoot><dl id='7Vt2m'><fieldset id='7Vt2m'></fieldset></dl></div>

        • <bdo id='7Vt2m'></bdo><ul id='7Vt2m'></ul>
          <tfoot id='7Vt2m'></tfoot>
              • <small id='7Vt2m'></small><noframes id='7Vt2m'>

                <legend id='7Vt2m'><style id='7Vt2m'><dir id='7Vt2m'><q id='7Vt2m'></q></dir></style></legend>
                  <tbody id='7Vt2m'></tbody>
                  本文介紹了PHP:“命令不同步"如果我在調用結果存儲過程后再次使用 mysqli::query()的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我的數據庫中有一個存儲過程,它返回表中的所有記錄:

                  I have a stored procedure in my db that returns all records in a table:

                  CREATE PROCEDURE showAll()
                  BEGIN
                      SELECT * FROM myTable;
                  END
                  

                  SP 工作正常.但是,如果我在 php 腳本中調用它然后我再次嘗試查詢數據庫,它總是失敗:

                  The SP works just as expected. But, if I call it in a php script and then I try to query the database again, it always fail:

                  // $mysqli is a db connection
                  
                  // first query:
                  
                  if (!$t = $mysqli->query("call showAll()"))
                      die('Error in the 1st query');
                  
                  while ($r = $t->fetch_row()) {
                      echo $r[0] . "<br>"; // this is ok
                  }
                  
                  $t->free(); // EDIT (this doesn't help anyway)
                  
                  // second query (does the same thing):
                  
                  if (!$t = $mysqli->query("SELECT * from myTable"))
                      die('Error in the 2nd query'); // I always get this error
                  
                  while ($r = $t->fetch_row()) {
                      echo $r[0] . "<br>";
                  }
                  

                  值得注意的是,如果我交換兩個查詢(即我在最后調用存儲過程),它可以正常工作而不會出現任何錯誤.在第二個查詢之前關閉()結果沒有幫助.一些提示?

                  Notable, if I swap the two queries (i.e. I call the stored procedure at the end) it works without any error. To close() the result before the second query doesn't help. Some hints?

                  mysqli::error() 是:?命令不同步;您現在無法運行此命令?.

                  mysqli::error() is: ?Commands out of sync; you can't run this command now?.

                  推薦答案

                  mysqli.query 的 php.net/manual 條目的評論已更新,現在包含對此的答案.總而言之,在 $t->close() 之后調用 $mysqli->next_result().向 petrus.jvr 致敬!

                  The comments on the php.net/manual entry for mysqli.query have been updated, and now include an answer for this. To summarize, call $mysqli->next_result() after $t->close(). Kudos to petrus.jvr!

                  鏈接:http://www.php.net/manual/en/mysqli.query.php#102904

                  這篇關于PHP:“命令不同步"如果我在調用結果存儲過程后再次使用 mysqli::query()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                  Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                  PHP Prepared Statement Problems(PHP 準備好的語句問題)
                  mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                  PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                  How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)
                  <tfoot id='Dywl5'></tfoot>

                  • <legend id='Dywl5'><style id='Dywl5'><dir id='Dywl5'><q id='Dywl5'></q></dir></style></legend>

                        <tbody id='Dywl5'></tbody>

                          <bdo id='Dywl5'></bdo><ul id='Dywl5'></ul>
                        • <i id='Dywl5'><tr id='Dywl5'><dt id='Dywl5'><q id='Dywl5'><span id='Dywl5'><b id='Dywl5'><form id='Dywl5'><ins id='Dywl5'></ins><ul id='Dywl5'></ul><sub id='Dywl5'></sub></form><legend id='Dywl5'></legend><bdo id='Dywl5'><pre id='Dywl5'><center id='Dywl5'></center></pre></bdo></b><th id='Dywl5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Dywl5'><tfoot id='Dywl5'></tfoot><dl id='Dywl5'><fieldset id='Dywl5'></fieldset></dl></div>

                          <small id='Dywl5'></small><noframes id='Dywl5'>

                          1. 主站蜘蛛池模板: 一级大黄色片 | 91在线视频免费观看 | 日韩视频在线免费观看 | 日韩在线看片 | 在线视频一区二区三区 | 天堂资源 | 一级黄色毛片 | 国产一区中文字幕 | 欧美色图另类 | 精品国产乱码久久久久久闺蜜 | 国产激情精品 | 亚洲不卡一 | 99精品视频在线 | 欧美在线a | 国产精品久久久久久福利一牛影视 | 久久国产高清视频 | 欧美成人影院 | 在线中文字幕av | 日本在线一二 | 天天综合网永久 | 久久久免费在线观看 | 午夜精品久久久 | 亚洲精品一区二区三区免 | 成人精品国产一区二区4080 | 久久小视频 | 成人av一区二区三区 | 精品国产一区二区三区久久久久久 | 国产精品美女 | www.99精品| 亚洲欧洲在线看 | 中文字幕av高清 | 夜夜骑首页 | 亚洲一区二区三区视频 | 国产日韩精品在线 | 一级做受毛片免费大片 | 欧美精品一二区 | 欧美成人黄色小说 | 日韩精品a在线观看图片 | 久久国产一区二区三区 | 国产免费一区 | 欧美人成在线视频 |