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

    <tfoot id='E5wc4'></tfoot>

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

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

      1. PDO 是執(zhí)行語句期間受影響的行

        PDO were rows affected during execute statement(PDO 是執(zhí)行語句期間受影響的行)
            <tbody id='VhAqK'></tbody>

            <legend id='VhAqK'><style id='VhAqK'><dir id='VhAqK'><q id='VhAqK'></q></dir></style></legend>
          • <small id='VhAqK'></small><noframes id='VhAqK'>

            <tfoot id='VhAqK'></tfoot>
              <bdo id='VhAqK'></bdo><ul id='VhAqK'></ul>

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

                  本文介紹了PDO 是執(zhí)行語句期間受影響的行的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我找到了很多方法來使用 PDO 的 exec 語句,但我不確定它對我有幫助.我的理解是我必須對準(zhǔn)備好的語句使用 execute() 函數(shù).我正在使用來自用戶輸入的數(shù)據(jù)更新一行,因此我想使用準(zhǔn)備好的語句而不是 query() 調(diào)用.

                  I have found many ways to use the exec statement for PDO, but I'm not sure it helps me. My understanding is that I have to use the execute() function for prepared statements. I am updating a row with data from user input, so I would like to use a prepared statement instead of the query() call.

                  我的代碼如下:

                  $dbh = buildDBConnector(); 
                  $sql = "UPDATE tb_users 
                      SET authState=1
                      WHERE id = ? AND authPass = ?";
                  $q = $dbh->prepare($sql);
                  $f = $q->execute(array($id,$authPass));
                  if($f){
                      echo '<br />Success<br />';
                  }else{
                      echo '<br />Failure<br />';
                  }
                  

                  問題是查詢本身沒有錯誤并且執(zhí)行得很好,所以沒有存儲在 $f 中的失敗.但是,我需要知道它是否真的找到了要更新的行,然后成功更新了它.換句話說,我需要受影響的行.在谷歌搜索等時,它不斷出現(xiàn) exec 語句,但據(jù)我所知, exec 不是用于準(zhǔn)備好的語句?有什么建議嗎?

                  The issue is that the query itself is error free and executes fine, so there is no failure to store in $f. However, I need to know if it actually found the row to update, then successfully updated it. In other words, I need the affected rows. When googling and such, it keeps coming to the exec statement, but from my understanding, exec isn't for prepared statements? Any suggestions?

                  推薦答案

                  試試 $q->rowCount().準(zhǔn)備好的語句將通過該方法返回受影響的行數(shù).

                  Try $q->rowCount(). Prepared statements will return the number of affected rows via that method.

                  這篇關(guān)于PDO 是執(zhí)行語句期間受影響的行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準(zhǔn)備好的語句amp;foreach 循環(huán))
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務(wù)器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數(shù))
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結(jié)果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“l(fā)ocalhost的訪問被拒絕)

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

                          <legend id='t3Q9Z'><style id='t3Q9Z'><dir id='t3Q9Z'><q id='t3Q9Z'></q></dir></style></legend>

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

                          1. 主站蜘蛛池模板: 日韩精品一区二区三区中文字幕 | 欧美性猛交一区二区三区精品 | 欧美日韩免费一区二区三区 | 韩国av一区二区 | www.五月天婷婷| 国产免费观看一级国产 | 欧美日韩亚洲系列 | 久久久成人动漫 | 午夜欧美a级理论片915影院 | 欧美中文在线 | 国产精品精品3d动漫 | 九色综合网| 一区二区视屏 | 久久伊人一区 | 精品一区在线免费观看 | 国产精品久久久久9999鸭 | 中国一级特黄真人毛片 | 亚洲欧美激情国产综合久久久 | 日韩电影免费观看中文字幕 | 麻豆一区一区三区四区 | 精品国产乱码久久久久久老虎 | 国产午夜影院 | 国产1区2区3区 | 日本韩国欧美在线观看 | 欧美精品一级 | 色吧综合网 | 天天弄天天操 | 黄色在线观看网址 | 黄色一级电影在线观看 | 欧美日韩综合精品 | 欧美精品第一页 | 午夜免费看视频 | 欧美成人激情 | 在线看片福利 | 国产精品一区二区av | 欧美aaaaaaaa | 亚洲精品乱码久久久久久按摩观 | 国产一区二区三区日韩 | 色综合色综合 | 国产精品免费一区二区三区四区 | 久久久久久女 |