pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="080wk02" 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循環(huán)內(nèi)的while循環(huán)內(nèi)執(zhí)行mysqli準(zhǔn)備好

        Executing mysqli prepared statment within while loop that#39;s within another while loop(在另一個while循環(huán)內(nèi)的while循環(huán)內(nèi)執(zhí)行mysqli準(zhǔn)備好的語句)
        <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="kwkaymo" id='Zl5lf'><tfoot id='Zl5lf'></tfoot><dl id='Zl5lf'><fieldset id='Zl5lf'></fieldset></dl></div>

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

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

                  問題描述

                  我正在努力實現(xiàn)以下目標(biāo):

                  I am trying to achieve the following:

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

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

                  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();
                  }
                  

                  這篇關(guān)于在另一個while循環(huán)內(nèi)的while循環(huán)內(nèi)執(zhí)行mysqli準(zhǔn)備好的語句的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準(zhǔn)備好的語句amp;foreach 循環(huán))
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務(wù)器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數(shù))
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結(jié)果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“l(fā)ocalhost的訪問被拒絕)
                  <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="iokucy0" 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>
                            主站蜘蛛池模板: 防水试验机_防水测试设备_防水试验装置_淋雨试验箱-广州岳信试验设备有限公司 | 首页_欧瑞传动官方网站--主营变频器、伺服系统、新能源、软起动器、PLC、HMI | 硬度计,金相磨抛机_厂家-莱州华煜众信试验仪器有限公司 | 便携式表面粗糙度仪-彩屏硬度计-分体式粗糙度仪-北京凯达科仪科技有限公司 | 上海地磅秤|电子地上衡|防爆地磅_上海地磅秤厂家–越衡称重 | 防火卷帘门价格-聊城一维工贸特级防火卷帘门厂家▲ | 铁素体测量仪/检测仪/铁素体含量测试仪-苏州圣光仪器有限公司 | 涂层测厚仪_漆膜仪_光学透过率仪_十大创新厂家-果欧电子科技公司 | 无负压供水设备,消防稳压供水设备-淄博创辉供水设备有限公司 | 电竞馆加盟,沈阳网吧加盟费用选择嘉棋电竞_售后服务一体化 | RO反渗透设备_厂家_价格_河南郑州江宇环保科技有限公司 | 跨境物流_美国卡派_中大件运输_尾程派送_海外仓一件代发 - 广州环至美供应链平台 | 西门子伺服电机维修,西门子电源模块维修,西门子驱动模块维修-上海渠利 | 工业冷却塔维修厂家_方形不锈钢工业凉水塔维修改造方案-广东康明节能空调有限公司 | 双效节能浓缩器-热回流提取浓缩机组-温州市利宏机械 | 商标转让-商标注册-商标查询-软著专利服务平台 - 赣江万网 | 英国公司注册-新加坡公司注册-香港公司开户-离岸公司账户-杭州商标注册-杭州优创企业 | 耐酸泵,耐腐蚀真空泵,耐酸真空泵-淄博华舜耐腐蚀真空泵有限公司 精密模具-双色注塑模具加工-深圳铭洋宇通 | 三板富 | 专注于新三板的第一垂直服务平台 | 行业分析:提及郑州火车站附近真有 特殊按摩 ?2025实地踩坑指南 新手如何避坑不踩雷 | 月嫂_保姆_育婴_催乳_母婴护理_产后康复_养老护理-吉祥到家家政 硫酸亚铁-聚合硫酸铁-除氟除磷剂-复合碳源-污水处理药剂厂家—长隆科技 | 时代北利离心机,实验室离心机,医用离心机,低速离心机DT5-2,美国SKC采样泵-上海京工实业有限公司 工业电炉,台车式电炉_厂家-淄博申华工业电炉有限公司 | 国标白水泥,高标号白水泥,白水泥厂家-淄博华雪建材有限公司 | 滑板场地施工_极限运动场地设计_滑板公园建造_盐城天人极限运动场地建设有限公司 | B2B网站_B2B免费发布信息网站_B2B企业贸易平台 - 企资网 | 自动售货机_无人售货机_专业的自动售货机运营商_免费投放售货机-广州富宏主官网 | 不锈钢轴流风机,不锈钢电机-许昌光维防爆电机有限公司(原许昌光维特种电机技术有限公司) | 成都LED显示屏丨室内户外全彩led屏厂家方案报价_四川诺显科技 | 清水混凝土修复_混凝土色差修复剂_混凝土色差调整剂_清水混凝土色差修复_河南天工 | ★店家乐|服装销售管理软件|服装店收银系统|内衣店鞋店进销存软件|连锁店管理软件|收银软件手机版|会员管理系统-手机版,云版,App | 高压分散机(高压细胞破碎仪)百科-北京天恩瀚拓 | FFU_空气初效|中效|高效过滤器_空调过滤网-广州梓净净化设备有限公司 | 阿里巴巴诚信通温州、台州、宁波、嘉兴授权渠道商-浙江联欣科技提供阿里会员办理 | 南京交通事故律师-专打交通事故的南京律师 | 济南电缆桥架|山东桥架-济南航丰实业有限公司 | 都江堰招聘网-都江堰人才网 都江堰人事人才网 都江堰人才招聘网 邢台人才网_邢台招聘网_邢台123招聘【智达人才网】 | 专业的新乡振动筛厂家-振动筛品质保障-环保振动筛价格—新乡市德科筛分机械有限公司 | 工业CT-无锡璟能智能仪器有限公司| 昆山新莱洁净应用材料股份有限公司-卫生级蝶阀,无菌取样阀,不锈钢隔膜阀,换向阀,离心泵 | 实战IT培训机构_IT培训班选大学生IT技术培训中心_中公优就业 | 蜗轮丝杆升降机-螺旋升降机-丝杠升降机厂家-润驰传动 |