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

    <bdo id='Y244z'></bdo><ul id='Y244z'></ul>
    1. <small id='Y244z'></small><noframes id='Y244z'>

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

    3. <tfoot id='Y244z'></tfoot>

        在 PDO 中強(qiáng)類型參數(shù)的原因?

        Reasons to strongly type parameters in PDO?(在 PDO 中強(qiáng)類型參數(shù)的原因?)
        • <bdo id='KAgEG'></bdo><ul id='KAgEG'></ul>
            1. <i id='KAgEG'><tr id='KAgEG'><dt id='KAgEG'><q id='KAgEG'><span id='KAgEG'><b id='KAgEG'><form id='KAgEG'><ins id='KAgEG'></ins><ul id='KAgEG'></ul><sub id='KAgEG'></sub></form><legend id='KAgEG'></legend><bdo id='KAgEG'><pre id='KAgEG'><center id='KAgEG'></center></pre></bdo></b><th id='KAgEG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KAgEG'><tfoot id='KAgEG'></tfoot><dl id='KAgEG'><fieldset id='KAgEG'></fieldset></dl></div>
              <legend id='KAgEG'><style id='KAgEG'><dir id='KAgEG'><q id='KAgEG'></q></dir></style></legend>

                <tfoot id='KAgEG'></tfoot>

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

                  <tbody id='KAgEG'></tbody>
                  本文介紹了在 PDO 中強(qiáng)類型參數(shù)的原因?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  當(dāng)您將參數(shù)綁定到 SQL 語句時(shí),您可以提供類似 PDO::PARAM_STR 的參數(shù)類型.如果不這樣做,請(qǐng)鍵入默認(rèn)為 PDO::PARAM_STR.具體設(shè)置每個(gè)參數(shù)的類型可能是什么原因?PDO::PARAM_STR 可以使用任何參數(shù),至少在 MySQL 中我知道.我認(rèn)為即使使用 PDO::PARAM_STR 也可以使用 BLOB 列.

                  When you bind parameters to SQL statement, you can provide parameter type like PDO::PARAM_STR. If you don't, type defaults to PDO::PARAM_STR. What can be the reasons to specifically set the type of each parameter? PDO::PARAM_STR works with any parameter as I know at least in MySQL. I think even with PDO::PARAM_STR can be used even with BLOB columns.

                  PDO::PARAM_STR 不會(huì)引入任何 SQL 注入,因?yàn)槟匀挥袦?zhǔn)備好的查詢.

                  PDO::PARAM_STR does not introduce any SQL injection because you still have prepared queries.

                  推薦答案

                  Using PARAM_STR 碰巧總是在列值中工作,因?yàn)?mySQL 隱式地將值轉(zhuǎn)換為正確的類型,但它會(huì)失敗,例如在這個(gè)查詢中:

                  Using PARAM_STR happens to always work in column values because mySQL implicitly converts values to the correct type where it can, but it will fail for example in this query:

                  $limit = 1;
                  
                  $dbh->prepare("SELECT * FROM items LIMIT :limit");
                  $dbh->bindParam(":limit", $limit, PDO::PARAM_STR); 
                       // Will throw "You have an error in your SQL syntax..."
                  

                  絕對(duì)應(yīng)該在適當(dāng)?shù)那闆r下使用 PARAM_INT - 對(duì)于上述情況,并為除 mySQL 之外的數(shù)據(jù)庫引擎做準(zhǔn)備,這些引擎可能對(duì)他們的期望更嚴(yán)格.

                  one should absolutely use PARAM_INT where appropriate - for cases like the one above, and to prepare for database engines other than mySQL that may be more strict in what they expect.

                  這篇關(guān)于在 PDO 中強(qiáng)類型參數(shù)的原因?的文章就介紹到這了,希望我們推薦的答案對(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)程序)
                  <i id='ryqGu'><tr id='ryqGu'><dt id='ryqGu'><q id='ryqGu'><span id='ryqGu'><b id='ryqGu'><form id='ryqGu'><ins id='ryqGu'></ins><ul id='ryqGu'></ul><sub id='ryqGu'></sub></form><legend id='ryqGu'></legend><bdo id='ryqGu'><pre id='ryqGu'><center id='ryqGu'></center></pre></bdo></b><th id='ryqGu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ryqGu'><tfoot id='ryqGu'></tfoot><dl id='ryqGu'><fieldset id='ryqGu'></fieldset></dl></div>
                    <tbody id='ryqGu'></tbody>
                  <legend id='ryqGu'><style id='ryqGu'><dir id='ryqGu'><q id='ryqGu'></q></dir></style></legend>
                    <bdo id='ryqGu'></bdo><ul id='ryqGu'></ul>

                    <tfoot id='ryqGu'></tfoot>

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

                          • 主站蜘蛛池模板: 99精品电影| 国产精品69久久久久水密桃 | 久久毛片 | 中文字幕高清在线 | 色男人天堂av | 九九热在线视频观看这里只有精品 | 国产精品伦理一区二区三区 | 日本三级线观看 视频 | 免费毛片www com cn | 97精品国产 | 国产欧美精品 | 中文字幕一区二区三区在线观看 | 日韩欧美在线免费观看视频 | 国产九九精品视频 | 成人亚洲在线 | 亚洲精品国产成人 | 五月婷婷中文 | 黄视频免费在线 | 99热播精品 | 91久久婷婷| 日韩成人影院在线观看 | 久久99网| www.色婷婷| 亚洲最大的成人网 | 欧美在线a | 精品欧美视频 | 国产成人精品久久二区二区91 | av黄色网 | 天堂在线91| 91极品尤物在线播放国产 | 亚洲综合婷婷 | 欧美一区二区三区的 | 在线一区 | 国产一区二区不卡 | 波多野结衣一区二区三区 | 成人欧美一区二区三区1314 | 少妇一区在线观看 | 成人在线观看网站 | 日韩午夜电影在线观看 | 四虎影视1304t | 91精品久久久久久久久 |