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

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

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

        <bdo id='iPnTp'></bdo><ul id='iPnTp'></ul>
        <tfoot id='iPnTp'></tfoot>
      1. 你如何在 mysqli 準備好的語句中使用 IN 子句

        How do you use IN clauses with mysqli prepared statements(你如何在 mysqli 準備好的語句中使用 IN 子句)

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

            <legend id='A3cQL'><style id='A3cQL'><dir id='A3cQL'><q id='A3cQL'></q></dir></style></legend>

              <tbody id='A3cQL'></tbody>

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

                  <bdo id='A3cQL'></bdo><ul id='A3cQL'></ul>
                • <tfoot id='A3cQL'></tfoot>
                  本文介紹了你如何在 mysqli 準備好的語句中使用 IN 子句的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用準備好的語句將一些舊代碼移至新的 msqli 接口,我在處理包含 IN 子句的 SQL 語句時遇到問題.我通常會這樣做:

                  I’m moving some old code over to the new msqli interface using prepared statements, I’m having trouble with SQL statements containing the IN clause. I would just normally do this:

                  $ids = '123,535,345,567,878'
                  $sql = "SELECT * FROM table WHERE id IN ($ids)";
                  $res = mysql_query($sql);
                  

                  將其轉換為 mysqli 和準備好的語句我嘗試了多種解決方案:

                  Converting this to mysqli and prepared statements I have tried a number of solutions:

                  $ids = '123,535,345,567,878'
                  $ids = implode($ids,',');
                  $result = $msqli->prepare("SELECT foo,blar FROM table WHERE id IN (?));
                  $result->bind_param("i", $ids);
                  $result->execute();
                  

                  以上失敗,計算數組中的元素數和更改 SQL 字符串中問號的數量以及為數組中的每個元素調用 bind_parm 也失敗.僅使用逗號分隔的字符串也會失敗.

                  The above fails and calculating the number of elements in the array and altering number of question marks in the SQL string and calling bind_parm for each element in the array also fails. Just using the comma separated string also fails.

                  我在 Google 上找不到關于此的好的文檔,那么您是如何解決這個問題的?

                  I can find no good documentation in Google on this, so how have you solved the problem?

                  推薦答案

                  看這里之前有人問過的一個類似問題的答案(第二個代碼示例):

                  Look at the answer to a similar question that has been asked here before (second code sample):

                  我有一個整數數組,如何在 mysql 查詢中使用每個整數(在 php 中)?

                  歸結為:

                  • 創建帶有適量問號的 SQL 字符串
                  • 使用 call_user_func_array() 將數組綁定到查詢字符串
                  • create the SQL string with the right amount of question marks
                  • use call_user_func_array() to bind your array to the query string

                  這篇關于你如何在 mysqli 準備好的語句中使用 IN 子句的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                  Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                  PHP Prepared Statement Problems(PHP 準備好的語句問題)
                  mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                  PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                  How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)
                  <tfoot id='D0cTT'></tfoot>

                • <legend id='D0cTT'><style id='D0cTT'><dir id='D0cTT'><q id='D0cTT'></q></dir></style></legend>

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

                              <tbody id='D0cTT'></tbody>
                            主站蜘蛛池模板: 久久免费国产视频 | 亚洲三区在线 | 日日射影院 | 日日夜精品视频 | 一级毛片免费视频 | 国产我和子的乱视频网站 | 久久国产一区二区 | www.色综合| 欧美一区视频在线 | 国产一区二区三区四区三区四 | 久久香焦| 久久久黄色| 免费亚洲视频 | 午夜视频在线观看视频 | 做a视频 | 国产高清在线精品一区二区三区 | 国产乱码精品一区二区三区中文 | 国产电影一区二区在线观看 | 91精品中文字幕一区二区三区 | 欧美一区二区视频 | 国产精品久久亚洲 | 国产精品极品美女在线观看免费 | 日韩精品久久久久久 | 精精国产xxxx视频在线 | 久久久久国产精品午夜一区 | 国产毛片毛片 | 羞羞视频在线观看网站 | 成人免费黄视频 | 午夜影晥| 亚洲成人久久久 | 精品免费观看 | 51ⅴ精品国产91久久久久久 | 成人在线电影在线观看 | 亚洲激情网站 | 国产精品永久 | 国产精品视频免费播放 | 久久网站免费视频 | 久久9热 | 羞羞视频免费在线 | 91看片网 | 中文字幕第二区 |