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

<small id='98e4q'></small><noframes id='98e4q'>

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

        在 Laravel 4 中轉義原始 SQL 查詢

        Escape raw SQL queries in Laravel 4(在 Laravel 4 中轉義原始 SQL 查詢)

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

              <bdo id='3WP01'></bdo><ul id='3WP01'></ul>
                <tbody id='3WP01'></tbody>
                <legend id='3WP01'><style id='3WP01'><dir id='3WP01'><q id='3WP01'></q></dir></style></legend><tfoot id='3WP01'></tfoot>

                  本文介紹了在 Laravel 4 中轉義原始 SQL 查詢的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何在 Laravel 4 中轉義傳遞給原始查詢的參數?我期待像 DB::escape()(它從 Laravel 3 中敲響鐘聲)并且還嘗試了 DB::quote()(我認為可以通過PDO 對象)

                  How does one go about escaping parameters passed to a raw query in Laravel 4? I expected something like DB::escape() (which rings a bell from Laravel 3) and also attempted DB::quote() (which I thought could be available through the PDO object)

                  $query = DB::select("SELECT * FROM users WHERE users.id = " . DB::escape($userId));
                  

                  我們不能使用帶有占位符的 select 方法,因為上面只是我們試圖實現的一個簡化示例.我們有一個大型自定義查詢,其中包含一些無法實現的嵌套選擇查詢適應查詢構建器.

                  We can't use the select method with placeholders as the above is just a simplified example of what we are trying to achieve. We have a large custom query with a few nested select queries that cannot be adapted to the query builder.

                  在插入 Laravel 4 之前轉義某些內容的最佳方法是什么?

                  What is the best approach to escaping something prior to inserting in Laravel 4?

                  我剛剛發現您可以通過這種方式訪問?? PDO 對象并在其上使用引用函數.這仍然是最好的方法,還是有更簡單的方法來訪問這個功能?

                  I've just discovered that you can access the PDO object and use the quote function on it this way. Is this still the best approach, or is there an easier way to access this function?

                  DB::connection()->getPdo()->quote("string to quote");
                  

                  推薦答案

                  您可以通過 DB 外觀以這種方式引用您的字符串.

                  You can quote your strings this way, through the DB facade.

                  DB::connection()->getPdo()->quote("string to quote");
                  

                  當我發現它時,我確實把這個答案放在了我的問題中,但是我現在把它作為一個實際的答案,以便其他人更容易找到.

                  I did put this answer in my question when I discovered it, however I've now put it in as an actual answer to make it easier for others to find.

                  這篇關于在 Laravel 4 中轉義原始 SQL 查詢的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 找不到驅動程序)
                1. <small id='L5hT8'></small><noframes id='L5hT8'>

                      <tbody id='L5hT8'></tbody>
                  1. <legend id='L5hT8'><style id='L5hT8'><dir id='L5hT8'><q id='L5hT8'></q></dir></style></legend>

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

                          • <bdo id='L5hT8'></bdo><ul id='L5hT8'></ul>

                          • <tfoot id='L5hT8'></tfoot>
                            主站蜘蛛池模板: 午夜视频一区二区三区 | 日韩激情一区二区 | 久久亚洲精品视频 | 欧美网站在线观看 | 日韩av在线看 | 乱色av| 欧美在线亚洲 | 日韩中文字幕第一页 | 黄网免费看| 黄色一级片免费看 | 日韩 国产 欧美 | 国产伦理一区 | 欧美精品日韩少妇 | 男女啪啪免费视频 | 我要看一级黄色片 | 国产精品99久久久久久久久 | a视频在线观看 | 日韩精品三区 | 这里只有精品在线观看 | 国产午夜一区二区三区 | 久久久久久久久国产 | 国产三级在线观看视频 | 三级视频在线观看 | 六月激情婷婷 | 一级特黄视频 | 91日韩欧美 | 视频爱爱免费视频爱爱太爽 | 欧美综合在线观看 | 2017天天干| 97在线超碰 | 成人网页| 亚洲天堂av网 | 国产一区中文字幕 | 天天燥日日燥 | 欧美又大又硬又粗bbbbb | 日韩精品三区 | 国产欧美激情 | 一区二区欧美日韩 | 视频在线观看一区 | 91导航 | 国产精品福利在线 |