久久久久久久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 中強類型參數的原因?

        Reasons to strongly type parameters in PDO?(在 PDO 中強類型參數的原因?)
        • <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 中強類型參數的原因?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當您將參數綁定到 SQL 語句時,您可以提供類似 PDO::PARAM_STR 的參數類型.如果不這樣做,請鍵入默認為 PDO::PARAM_STR.具體設置每個參數的類型可能是什么原因?PDO::PARAM_STR 可以使用任何參數,至少在 MySQL 中我知道.我認為即使使用 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 不會引入任何 SQL 注入,因為您仍然有準備好的查詢.

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

                  推薦答案

                  Using PARAM_STR 碰巧總是在列值中工作,因為 mySQL 隱式地將值轉換為正確的類型,但它會失敗,例如在這個查詢中:

                  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..."
                  

                  絕對應該在適當的情況下使用 PARAM_INT - 對于上述情況,并為除 mySQL 之外的數據庫引擎做準備,這些引擎可能對他們的期望更嚴格.

                  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.

                  這篇關于在 PDO 中強類型參數的原因?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

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

                          • 主站蜘蛛池模板: 999国产精品视频 | 日本在线中文 | 婷婷久久精品一区二区 | 自拍偷拍中文字幕 | 91久久| 亚洲 欧美 日韩在线 | 久草网站| 91精品国产日韩91久久久久久 | 九九热在线观看视频 | 国产h视频 | 99国内精品久久久久久久 | 成人久久网 | 亚洲精品久久久久久下一站 | 在线观看成人精品 | 国产乱肥老妇国产一区二 | 久久精品中文字幕 | 国产一级成人 | 亚洲成人午夜在线 | 91新视频| 精品久久电影 | 成人国产精品色哟哟 | 一区二区三区四区免费在线观看 | 中文字幕精品视频 | 亚洲九九| 福利视频网站 | 日本精品一区二区 | 精品欧美 | 欧美精品一 | 成人精品鲁一区一区二区 | 欧美精品日韩精品国产精品 | 亚洲www | 激情欧美日韩一区二区 | 欧美一区二区三区免费电影 | 91精品国产91久久久久久不卞 | 久久在看 | 精品国产一区二区三区免费 | 9191在线播放 | 日韩精品一区二区三区视频播放 | 国产精品美女久久久久aⅴ国产馆 | 99热在线免费| 男人的天堂在线视频 |