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

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

          <bdo id='x5Om3'></bdo><ul id='x5Om3'></ul>
        <legend id='x5Om3'><style id='x5Om3'><dir id='x5Om3'><q id='x5Om3'></q></dir></style></legend><tfoot id='x5Om3'></tfoot>
      1. <small id='x5Om3'></small><noframes id='x5Om3'>

      2. 重置 PDO 中的光標位置

        Reset cursor position in PDO(重置 PDO 中的光標位置)
        <legend id='oqh3L'><style id='oqh3L'><dir id='oqh3L'><q id='oqh3L'></q></dir></style></legend>
        <tfoot id='oqh3L'></tfoot>

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

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

                <bdo id='oqh3L'></bdo><ul id='oqh3L'></ul>

                1. 本文介紹了重置 PDO 中的光標位置的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  $data=$stmt->fetchAll(); //Dumping the data shows the result. It is also setting the cursor at the end
                  
                  while($data=$stmt->fetch())
                  {
                  //Does not enters loop
                  //If fetchAll() removes it work as usual
                  }
                  

                  我知道它不需要兩次獲取數據.但我的主要問題是如何在 PDO 中重置光標位置?

                  I know It dont need to fetch data twice. But my main question is How to reset cursor position in PDO?

                  推薦答案

                  AFAIK 無法使用 PDO 重置光標位置 - 這可能與某些不支持重置內部光標的數據庫的兼容性有關.

                  AFAIK there is no possibility to reset cursor position with PDO - that might something to do with compatibility with some databases, that don't support resetting internal cursors.

                  如果你想對結果迭代兩次,把它取到數組中并在這個數組上迭代:

                  If you want to iterate twice over the results, fetch it to the array and iterate over this array:

                  <?php 
                  $results = $stmt->fetchAll();  
                  foreach($results as $row) {
                      // first
                  }
                  
                  foreach($results as $row) {
                      // second
                  }
                  

                  編輯 某些數據庫支持可滾動游標.要使用它,請將 PDO::CURSOR_SCROLL 標志添加到 prepare 方法(參見 PDOFetch 文檔頁面).但這只會增加向前或向后移動的可能性,而不是完全倒帶.此外,并非所有數據庫都支持這種類型的游標(例如 MySQL 不支持).

                  Edit Some databases support scrollable cursors. To use that, add PDO::CURSOR_SCROLL flag to prepare method (see examples at PDOFetch documentation page). But that only adds possibility to move forward or backward, not rewind completely. Also, not all databases support that type of cursor (e.g. MySQL doesn't).

                  這篇關于重置 PDO 中的光標位置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)
                    <i id='l1uPN'><tr id='l1uPN'><dt id='l1uPN'><q id='l1uPN'><span id='l1uPN'><b id='l1uPN'><form id='l1uPN'><ins id='l1uPN'></ins><ul id='l1uPN'></ul><sub id='l1uPN'></sub></form><legend id='l1uPN'></legend><bdo id='l1uPN'><pre id='l1uPN'><center id='l1uPN'></center></pre></bdo></b><th id='l1uPN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='l1uPN'><tfoot id='l1uPN'></tfoot><dl id='l1uPN'><fieldset id='l1uPN'></fieldset></dl></div>

                    <tfoot id='l1uPN'></tfoot>

                        <tbody id='l1uPN'></tbody>
                          <bdo id='l1uPN'></bdo><ul id='l1uPN'></ul>
                          <legend id='l1uPN'><style id='l1uPN'><dir id='l1uPN'><q id='l1uPN'></q></dir></style></legend>
                        • <small id='l1uPN'></small><noframes id='l1uPN'>

                            主站蜘蛛池模板: 久草.com | 精品一区在线 | 精品久久国产视频 | 婷婷91| 日韩中文电影 | 欧美国产精品 | 6080亚洲精品一区二区 | www.国产一区| av香蕉| 二区久久 | 日本一区二区在线视频 | 在线一区二区三区 | 亚洲综合五月天婷婷 | 久久免费精品 | 久久久精品综合 | 97精品久久 | www四虎影视 | 成人av免费在线观看 | 国产精品成人在线播放 | 午夜电影网站 | 天天草天天射 | 国产黄色大片 | 欧美性另类 | 国产精品黄 | 日韩av美女电影 | 国产精品久久久久aaaa九色 | 国产精品日韩欧美一区二区三区 | 久久久www成人免费无遮挡大片 | 久久国产视频网 | 一区二区三区在线免费观看视频 | 一级免费在线视频 | 日本精品久久久久久久 | 日韩精品福利 | 国产网站在线播放 | 美女逼网站 | 国产999精品久久久久久 | 91精品一区二区三区久久久久 | 一级在线观看 | 国产精品海角社区在线观看 | 欧美黄色性生活视频 | 亚洲欧美日韩电影 |