久久久久久久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'>

                          • 主站蜘蛛池模板: 特一级毛片 | 欧美黄色网 | 欧美一区二区三区的 | 99热这里 | 国产成人在线观看免费网站 | 日本免费在线视频 | 欧美亚洲| 亚洲天码中字 | 国产精品免费人成网站酒店 | 国产做受入口竹菊 | 日韩av毛片| 9.1成人看片 | 国产一区二区三区在线观看视频 | 亚洲免费福利视频 | 日本亚洲欧美 | 欧美午夜精品久久久久免费视 | 免费在线毛片 | 午夜高清| 成人av免费看| 四虎8848精品成人免费网站 | 国产精品一区在线播放 | 国产一级免费 | 亚洲h视频 | 91亚洲国产成人精品性色 | 欧美理论在线观看 | 伊人9999| 国产精品久久久久久中文字 | 51成人网| 欧美黄色免费网站 | 色综合天天综合网天天狠天天 | 亚洲国产精品va在线看黑人 | 三级免费观看 | 欧美精品一区二区三区四区 | 欧美成人一区二区三区片免费 | 小镇姑娘国语版在线观看免费 | 精品国产欧美一区二区三区成人 | 成人手机在线观看 | 中文字幕高清在线 | 青青草伊人网 | 亚洲永久精品视频 | 99精品久久久久久中文字幕 |