久久久久久久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>
                            主站蜘蛛池模板: 成人综合在线视频 | 日韩中文不卡 | 日本一区二区不卡视频 | 久久精品99久久 | 欧美一区成人 | 男女啪啪高潮无遮挡免费动态 | 一区在线播放 | 亚洲欧美中文日韩在线v日本 | 免费黄色片在线观看 | 欧美黑人巨大videos精品 | 天堂色区 | av香蕉| 婷婷色在线 | 中文字幕日韩av | 国产欧美精品一区二区色综合朱莉 | 久久久久久国产精品 | 久久免费视频1 | 国产91视频一区二区 | 日本三级电影免费观看 | 欧美四虎 | 日韩av成人在线 | 一区二区三区欧美 | 亚洲精品视频免费观看 | 日韩高清av| 中文天堂在线观看 | 国产精品亚洲片在线播放 | 天堂一区二区三区 | 一级黄a| 久久久久成人精品免费播放动漫 | 欧美日韩综合一区 | 97精品一区二区 | a a毛片| 中文字幕日韩欧美一区二区三区 | www在线视频| 欧美视频成人 | 国产一区二区三区视频免费观看 | 色网在线观看 | 国产一区二区三区免费观看在线 | 国产在线视频在线观看 | 国产精彩视频 | 久久高清国产 |