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

  1. <tfoot id='jTItx'></tfoot>

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

      “活動結果不包含任何字段"在 MS SQL 中使用

      quot;The active result contains no fieldsquot; using PDO with MS SQL(“活動結果不包含任何字段在 MS SQL 中使用 PDO)

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

          <legend id='EWwM1'><style id='EWwM1'><dir id='EWwM1'><q id='EWwM1'></q></dir></style></legend>
          • <bdo id='EWwM1'></bdo><ul id='EWwM1'></ul>

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

                <tbody id='EWwM1'></tbody>
                本文介紹了“活動結果不包含任何字段"在 MS SQL 中使用 PDO的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在將一些舊的 PHP 頁面轉(zhuǎn)換為使用 PDO.

                下面是兩個簡化的查詢(不是我的實際查詢),以幫助理解我遇到的問題...

                SELECT afield INTO #temptable FROM atable WHERE anotherfield = 'somevalue';SELECT afield,anotherfield,onemorefield FROM atableWHERE afield NOT IN (SELECT * FROM #temptable);

                上面的查詢拋出標題中描述的錯誤(更完整的是它拋出致命錯誤:未捕獲異常'PDOException',消息為'SQLSTATE[IMSSP]:查詢的活動結果不包含字段.'")

                如果我像這樣更改查詢...

                with (SELECT afield INTO #temptable FROM atableWHERE anotherfield = 'somevalue') AS temptable;SELECT afield,anotherfield,onemorefield FROM atablewhere afield NOT IN (SELECT * FROM temptable);

                這似乎解決了錯誤,但這個版本的查詢效率低得可怕,因為它似乎對另一個查詢中的每個字段比較運行臨時查詢.

                有沒有辦法讓第一個表單(創(chuàng)建一次臨時表)與 PDO 一起工作?

                它在使用 mssql 的舊頁面上運行良好.

                我知道我可以通過創(chuàng)建一個真實的表以凌亂"的方式做到這一點,在 php 中運行它,然后運行第二個查詢(在單獨的 php 調(diào)用中),然后運行第三個查詢以刪除第一個表.但我寧愿不必訴諸那個!:)

                解決方案

                如果您使用的是存儲過程,請使用

                SET NOCOUNT ON

                問題是存儲過程返回的結果包含受影響的行數(shù)作為第一個結果.

                微軟文檔

                I am in the process of converting some old PHP pages to use PDO.

                Below are two simplified queries (not my actual queries) to aid understanding of the problem I'm having...

                SELECT afield INTO #temptable FROM atable WHERE anotherfield = 'somevalue';
                
                SELECT afield,anotherfield,onemorefield FROM atable 
                WHERE afield NOT IN (SELECT * FROM #temptable);
                

                The above query throws the error described in the title (more completely it throws "Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[IMSSP]: The active result for the query contains no fields.'")

                If I alter the query like this...

                with (SELECT afield INTO #temptable FROM atable 
                WHERE anotherfield = 'somevalue') AS temptable;
                
                SELECT afield,anotherfield,onemorefield FROM atable 
                where afield NOT IN (SELECT * FROM temptable);
                

                This seems to get around the error, but this version of the query is horribly horribly inefficient because it appears to run the temptable query for every single field comparison in the other query.

                Is there a way to make the first form (which creates a temporary table once) work with PDO?

                It worked fine on the old page which used mssql.

                EDIT: I know I can probably do this in a 'messy' way by creating a real table, run it in php, then run the second query (in a separate php call) , then run a third query to drop the first table. But I'd rather not have to resort to that! :)

                解決方案

                If you are using a stored procedure then use

                SET NOCOUNT ON 
                

                The problem is that the stored procedure returns a result containing the number of rows affected as the first result.

                Microsoft Documentation

                這篇關于“活動結果不包含任何字段"在 MS SQL 中使用 PDO的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關文檔推薦

                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 找不到驅(qū)動程序)
                  <tbody id='P5PXx'></tbody>

                  • <tfoot id='P5PXx'></tfoot>

                      <legend id='P5PXx'><style id='P5PXx'><dir id='P5PXx'><q id='P5PXx'></q></dir></style></legend>
                    1. <small id='P5PXx'></small><noframes id='P5PXx'>

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

                        <bdo id='P5PXx'></bdo><ul id='P5PXx'></ul>
                        1. 主站蜘蛛池模板: 日日日视频 | 91在线视频一区 | 久久久久久久久久久高潮一区二区 | 在线观看国产视频 | 国产高清在线精品 | 欧美成人a | 日韩欧美中文在线 | 亚洲高清在线观看 | 一区二区三区在线 | 91成人午夜性a一级毛片 | 亚洲精品白浆高清久久久久久 | 国产一级在线观看 | 久久亚洲欧美日韩精品专区 | 99精品视频一区二区三区 | 偷拍自拍在线观看 | 在线成人| 激情毛片 | 精品无码久久久久国产 | 毛片网在线观看 | 国产精品有限公司 | 久久成人精品视频 | 国产美女精品 | 韩国理论电影在线 | 日本手机在线 | av网站在线播放 | 久久成人免费 | 免费在线日韩 | www.久久影视 | 视频一区在线观看 | 欧美 日韩 综合 | 中文字幕视频一区二区 | 超碰日本| 免费久久网 | 福利二区| 久久综合久久久 | av一区二区三区 | 最新伦理片 | 亚洲欧美精品国产一级在线 | av大片| 亚洲欧洲视频 | 奇米超碰在线 |