zoukankan      html  css  js  c++  java
  • 数组组合查询问题

    数组组合查询问题

    • 原因:在查询数据库的时候数组中的元素依然在条件语句中存在,会导致第一个查询成功,第二次查询失败

        $goods_id_array ;
        $goods_number_array ;
       
       for ($i = 0; $i < count($goods_id_array); $i++) {
      
           $number = $this->where($where)->find();
      
           $where["goods_for_sale"] = $n["goods_num"] + $number["goods_for_sale"];
          
           if ($this->save($where) === false) {
               $result["code"] = 603;
               $result["msg"] = $this->getError();
           }
      
       	//删除上一次更新的时候添加的条件
           unset($where["goods_sales"]);
      
       }
  • 相关阅读:
    快速模幂
    UPC-2249 曲线分割【递推】
    maven 服务器
    maven repo
    php-fpm sock
    mysql
    go 1
    xdebug
    centos
    win10 2503 2502
  • 原文地址:https://www.cnblogs.com/ikai/p/7519110.html
Copyright © 2011-2022 走看看