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

  • <small id='9dPO4'></small><noframes id='9dPO4'>

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

    • <bdo id='9dPO4'></bdo><ul id='9dPO4'></ul>

      1. 在另一個while循環內的while循環內執行mysqli準備好

        Executing mysqli prepared statment within while loop that#39;s within another while loop(在另一個while循環內的while循環內執行mysqli準備好的語句)
        <legend id='Zl5lf'><style id='Zl5lf'><dir id='Zl5lf'><q id='Zl5lf'></q></dir></style></legend>
          <bdo id='Zl5lf'></bdo><ul id='Zl5lf'></ul>
        • <tfoot id='Zl5lf'></tfoot>
                <tbody id='Zl5lf'></tbody>
            • <i id='Zl5lf'><tr id='Zl5lf'><dt id='Zl5lf'><q id='Zl5lf'><span id='Zl5lf'><b id='Zl5lf'><form id='Zl5lf'><ins id='Zl5lf'></ins><ul id='Zl5lf'></ul><sub id='Zl5lf'></sub></form><legend id='Zl5lf'></legend><bdo id='Zl5lf'><pre id='Zl5lf'><center id='Zl5lf'></center></pre></bdo></b><th id='Zl5lf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Zl5lf'><tfoot id='Zl5lf'></tfoot><dl id='Zl5lf'><fieldset id='Zl5lf'></fieldset></dl></div>

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

                  本文介紹了在另一個while循環內的while循環內執行mysqli準備好的語句的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在努力實現以下目標:

                  I am trying to achieve the following:

                  User 1:
                       - Alert 1 Email
                       - Alert 2 Email
                  User 2:
                       - Alert 1 Email
                       - Alert 2 Email
                  

                  我試圖在另一個運行 mysqli 準備好的語句的 while 循環中使用一個 while 循環來完成此操作,但我無法讓它工作.

                  I'm trying to accomplish this with a while loop inside another while loop that is running a mysqli prepared statement, but I cannot get it to work.

                  代碼:

                  $stmtAdd = $conn->prepare("INSERT INTO Data (row1, row2, row3, row4) VALUES ('".$row1."', '".$row2."', '".$row3."', '".$row4."')");
                  $stmtAdd->execute();
                  $stmtAdd->close();
                  
                  $stmtUsers = $conn->prepare("SELECT username, setting1 FROM Users");
                  $stmtUsers->store_result();
                  if ($stmtUsers->execute() === FALSE) {
                      die("Could not execute prepared statement");
                  } else {
                      $stmtUsers->bind_result($user, $setting1);
                      while ($stmtUsers->fetch()) {
                          /* Check if each user has setting 1 disabled */
                          if ($setting1 == '0'){
                              /* Check if any alerts exist for each user */
                              $stmtUsersAlerts = $conn->prepare("SELECT name, filter, email FROM Alerts WHERE user='".$user."' AND type='1'");
                              $stmtUsersAlerts->store_result();
                              $stmtUsersAlerts->bind_result($name, $filter, $email);
                              while ($stmtUsersAlerts->fetch()) {
                                  /* Send email */
                              }
                              $stmtUsersAlerts->close();
                          }
                      }
                      $stmtUsers->close();
                  }
                  

                  推薦答案

                  stmt->store_result() 不能在 stmt->execute() 之前運行.

                  stmt->store_result() can not run before stmt->execute().

                  $stmtUsers = $conn->prepare("SELECT username, setting1 FROM Users");
                  if ($stmtUsers->execute() === FALSE) {
                      die("Could not execute prepared statement");
                  } else {
                      $stmtUsers->store_result();                // After execute()
                      $stmtUsers->bind_result($user, $setting1);
                      while ($stmtUsers->fetch()) {
                          /* Check if each user has setting 1 disabled */
                          if ($setting1 == '0'){
                              /* Check if any alerts exist for each user */
                              $stmtUsersAlerts = $conn->prepare("SELECT name, filter, email FROM Alerts WHERE user='".$user."' AND type='1'");
                              $stmtUsersAlerts->execute();        // This line was missing
                              $stmtUsersAlerts->store_result();
                              $stmtUsersAlerts->bind_result($name, $filter, $email);
                              while ($stmtUsersAlerts->fetch()) {
                                  /* Send email */
                              }
                              $stmtUsersAlerts->close();
                          }
                      }
                      $stmtUsers->close();
                  }
                  

                  這篇關于在另一個while循環內的while循環內執行mysqli準備好的語句的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)
                  <i id='LBuGd'><tr id='LBuGd'><dt id='LBuGd'><q id='LBuGd'><span id='LBuGd'><b id='LBuGd'><form id='LBuGd'><ins id='LBuGd'></ins><ul id='LBuGd'></ul><sub id='LBuGd'></sub></form><legend id='LBuGd'></legend><bdo id='LBuGd'><pre id='LBuGd'><center id='LBuGd'></center></pre></bdo></b><th id='LBuGd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LBuGd'><tfoot id='LBuGd'></tfoot><dl id='LBuGd'><fieldset id='LBuGd'></fieldset></dl></div>

                      <tfoot id='LBuGd'></tfoot>

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

                        <bdo id='LBuGd'></bdo><ul id='LBuGd'></ul>
                            <tbody id='LBuGd'></tbody>
                            <legend id='LBuGd'><style id='LBuGd'><dir id='LBuGd'><q id='LBuGd'></q></dir></style></legend>
                            主站蜘蛛池模板: 欧美成人精品在线观看 | 中文字幕综合在线 | 亚洲www啪成人一区二区 | 福利片在线观看 | 国产97碰免费视频 | 毛片在线看片 | 龙珠z国语版在线观看 | 欧美一级高清片 | 在线看无码的免费网站 | 久久久在线视频 | 欧美视频在线免费 | 337p日本欧洲亚洲大胆 | 国产精品久久久久婷婷二区次 | 国产一区二区高清在线 | 国产日韩欧美在线一区 | 91精品国产91久久久久久密臀 | 91pao对白在线播放 | 高清国产午夜精品久久久久久 | 亚洲综合色自拍一区 | 在线国产一区 | 日韩欧美三区 | 日本视频在线播放 | 在线第一页 | 欧美 日韩 国产 成人 在线 91 | 日韩精品一区二区三区中文字幕 | 欧美日韩免费视频 | www.99热这里只有精品 | 99精品国产一区二区青青牛奶 | 亚洲在线日韩 | 91精品久久久久久久久久 | 亚洲一区二区三区免费 | 中文字幕人成乱码在线观看 | 久久久久国产一区二区三区四区 | 亚洲一区二区三区在线观看免费 | 成年人在线观看视频 | 国产精品久久久久久久久久久久久久 | 国产激情99| 亚洲视频免费在线观看 | 成年人免费看的视频 | 久久伊人精品一区二区三区 | 国产成人免费 |