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

  • <legend id='cynjO'><style id='cynjO'><dir id='cynjO'><q id='cynjO'></q></dir></style></legend>
  • <tfoot id='cynjO'></tfoot>

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

      1. <small id='cynjO'></small><noframes id='cynjO'>

        PDO->query() 和 PDO->exec() 之間的區(qū)別

        Difference between PDO-gt;query() and PDO-gt;exec()(PDO-query() 和 PDO-exec() 之間的區(qū)別)
        <legend id='7zRPK'><style id='7zRPK'><dir id='7zRPK'><q id='7zRPK'></q></dir></style></legend>
      2. <small id='7zRPK'></small><noframes id='7zRPK'>

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

                1. 本文介紹了PDO->query() 和 PDO->exec() 之間的區(qū)別的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  讓對(duì) PDO 的引用等于 PDO 對(duì)象而不是 PDO 本身--

                  我看到 這里 有 PDO->query()PDO->exec().在鏈接的頁(yè)面中,PDO->query(); 似乎僅用于 SELECT 語(yǔ)句,而 PDO->exec() 用于 UPDATE,INSERT,DELETE 語(yǔ)句.現(xiàn)在,我是 PDO 的新手,所以我不確定在使用它方面發(fā)生了什么相當(dāng),所以我希望解釋為什么要使用不同的方法,以及為什么有不同的方法.

                  I see here that there is both PDO->query() and PDO->exec(). In the page that was linked, it appears that PDO->query(); is used for SELECT statements ONLY, and PDO->exec() is used for UPDATE,INSERT,DELETE statements. Now, I am brand new to PDO, so I'm not sure what is going on in terms of using it quite yet, so I would appreciate an explanation on why to use the different methods, and why there are different methods.

                  推薦答案

                  盡管有任何理論上的差異,但無(wú)論如何都不應(yīng)該使用這些函數(shù) - 所以,沒(méi)有什么可擔(dān)心的.

                  Despite of whatever theoretical difference, none of these functions should be used anyway - so, there is nothing to concern of.

                  使用 PDO 的唯一原因是支持準(zhǔn)備好的語(yǔ)句,但這些函數(shù)都沒(méi)有提供它.因此,不應(yīng)使用它們.

                  The only reason of using PDO is support for prepared statements, but none of these functions offers it. So, they shouldn't be used.

                  改用prepare()/execute()尤其用于UPDATE、INSERT、DELETE語(yǔ)句.

                  Use prepare()/execute() instead, especially for UPDATE,INSERT,DELETE statements.

                  請(qǐng)注意,雖然準(zhǔn)備好的聲明被廣泛宣傳為一種安全措施,但它只是為了引起人們的注意.但他們真正的目的是正確的查詢格式.這也為您提供了安全性 - 因?yàn)楦袷秸_的查詢也不能被注入 - 就像副作用一樣.但同樣 - 格式化是一個(gè)主要目標(biāo),因?yàn)槿绻袷讲徽_,即使是無(wú)害的數(shù)據(jù)也可能導(dǎo)致查詢錯(cuò)誤.

                  Please note that although prepared statements are widely advertised as a security measure, it is only to attract people's attention. But their real purpose is proper query formatting. Which gives you security too - as properly formatted query cannot be injected as well - just as side effect. But again - formatting is a primary goal, just because even innocent data may cause a query error if not formatted properly.

                  請(qǐng)注意,execute() 僅返回 TRUEFALSE 以指示操作成功.對(duì)于其他信息,例如受 UPDATE 影響的記錄數(shù),提供了諸如 rowCount() 之類的方法.請(qǐng)參閱文檔.

                  Please note that execute() returns only TRUE or FALSE to indicate success of the operation. For other information, such as the number of records affected by an UPDATE, methods such as rowCount() are provided. See the docs.

                  這篇關(guān)于PDO->query() 和 PDO->exec() 之間的區(qū)別的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準(zhǔn)備好的語(yǔ)句amp;foreach 循環(huán))
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無(wú)法識(shí)別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個(gè)參數(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的訪問(wèn)被拒絕)

                    <tfoot id='ghB7c'></tfoot>
                    <legend id='ghB7c'><style id='ghB7c'><dir id='ghB7c'><q id='ghB7c'></q></dir></style></legend>

                        <tbody id='ghB7c'></tbody>
                        <bdo id='ghB7c'></bdo><ul id='ghB7c'></ul>

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

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

                          • 主站蜘蛛池模板: 婷婷在线视频 | 91久久精品国产91久久 | 日韩精品免费在线观看 | av中文字幕网站 | 国产视频在线一区二区 | 免费网站国产 | 亚洲第一视频网 | 午夜寂寞影院在线观看 | 天天天久久久 | 麻豆亚洲 | 成人在线视频看看 | 亚洲欧美在线一区 | av影片在线 | www.国产91 | 亚洲人成在线观看 | 精品福利在线 | 亚洲不卡视频 | 欧美成人在线免费 | 国产精品视频网 | 国产欧美日韩久久久 | 视频一区二区中文字幕 | 成人精品视频99在线观看免费 | 久久久久久久av麻豆果冻 | 久久亚洲一区二区 | 日韩免费在线视频 | 亚洲xxxxx | 夜夜草天天草 | 欧美专区在线视频 | 亚洲成人精品一区 | 亚洲精品一区二区在线 | 亚洲精品福利在线 | 国产高清在线精品 | 日本aa毛片a级毛片免费观看 | 国产高清在线精品 | 国产精品欧美一区二区三区不卡 | 粉嫩国产精品一区二区在线观看 | 亚洲综合伊人 | 99综合在线 | 91精品国产乱码久久久久久 | 一区二区福利视频 | 一区二区三区亚洲 |