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

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

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

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

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

      <tfoot id='dTKAL'></tfoot>

    2. 使用 PDO Prepared Statement 并遞增列值

      Using PDO Prepared Statement and Incrementing a column value(使用 PDO Prepared Statement 并遞增列值)

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

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

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

        1. <tfoot id='Mu9DC'></tfoot>
              <tbody id='Mu9DC'></tbody>

              1. <i id='Mu9DC'><tr id='Mu9DC'><dt id='Mu9DC'><q id='Mu9DC'><span id='Mu9DC'><b id='Mu9DC'><form id='Mu9DC'><ins id='Mu9DC'></ins><ul id='Mu9DC'></ul><sub id='Mu9DC'></sub></form><legend id='Mu9DC'></legend><bdo id='Mu9DC'><pre id='Mu9DC'><center id='Mu9DC'></center></pre></bdo></b><th id='Mu9DC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Mu9DC'><tfoot id='Mu9DC'></tfoot><dl id='Mu9DC'><fieldset id='Mu9DC'></fieldset></dl></div>
                本文介紹了使用 PDO Prepared Statement 并遞增列值的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我已閱讀此線程:問題遞增MySQL/PHP 中的一個(gè)字段,帶有準(zhǔn)備好的語句,但沒有看到我的問題的答案.

                I've read this thread: Issues incrementing a field in MySQL/PHP with prepared statements but didn't see the answer to my problem.

                PDOStatement Object
                (
                
                    [queryString] => UPDATE user_alerts SET notif = ? + 2 WHERE ( user_id = ? )   
                
                )
                
                $stmt->execute( array( 'notif', '1' ) );
                

                據(jù)我所知,這一切都是正確的.

                As far as I can tell, all this is correct.

                當(dāng)上面的代碼執(zhí)行時(shí),不管notif列的值是什么,它都會(huì)將notif列設(shè)置為2.就好像 SQL 讀起來像 SET notif = 2 而不是 SET notif = notif + 2

                When the above code executes, it sets the notif column equal to 2 irregardless of what the value of the notif column is. It's as if the SQL is reading like SET notif = 2 instead of SET notif = notif + 2

                我一直無法弄清楚,非常感謝您的幫助!

                I haven't been able to figure it out and would really appreciate help!

                推薦答案

                $sql = 'UPDATE user_alerts SET notif = notif + 2 WHERE ( user_id = :userid )';
                $prepStatement = $pdo->prepare( $sql );
                $prepStatement->execute(array(':userid' => $userid));
                

                您不能將列名綁定到準(zhǔn)備好的語句.

                You can't bind a column name to a prepared statement.

                這篇關(guān)于使用 PDO Prepared Statement 并遞增列值的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)

                  <tbody id='v4v68'></tbody>
              2. <tfoot id='v4v68'></tfoot>
                  • <legend id='v4v68'><style id='v4v68'><dir id='v4v68'><q id='v4v68'></q></dir></style></legend>

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

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

                          主站蜘蛛池模板: 亚洲欧美综合精品久久成人 | 日本二区 | 国内精品久久影院 | 亚洲欧美中文字幕在线观看 | 精品国产免费一区二区三区五区 | 中文字幕一区二区三区四区五区 | 中文字幕日韩欧美一区二区三区 | 日韩一区在线视频 | 欧美日韩在线一区二区三区 | 午夜影院黄 | 精品久久久久久 | 91大神在线看 | 国产999精品久久久 日本视频一区二区三区 | 亚洲欧美成人在线 | 男人天堂久久久 | 三级黄色大片网站 | 欧美精品v国产精品v日韩精品 | 男人电影天堂 | 香蕉久久a毛片 | 91精品在线看 | www久久 | 美女视频h| 亚洲黄色av网站 | 日韩欧美1区2区 | 99热视| 国内成人免费视频 | av午夜电影 | 久久国产精品一区二区 | 中文字幕 在线观看 | 一级黄色片一级黄色片 | 亚洲一区二区三区视频 | 国产欧美日韩一区二区三区在线 | 成人在线观看中文字幕 | 国产精品不卡视频 | 天堂中文av | 一区二区视频在线 | 成人毛片一区二区三区 | 精品国产一区二区三区久久 | 一区二区三区不卡视频 | 日本久久一区二区三区 | 久久国产精品偷 |