5的mongo报$in needs an array怎么解决

浏览:1400 发布日期:2017/01/13 分类:求助交流 关键字: thinkphp5 mongo
thinkphp5链接mongo数据库,数据添加修改都没问题,但是删除报错,报

$in needs an array

这怎么解决,搞了老旧不理解                // 记录执行指令
                $this->queryStr = 'db' . strstr($namespace, '.') . '.' . $this->queryStr;
            }
            $this->debug(true);
        
            echo '-'.json_encode($namespace).'<br/>';
            echo '-'.json_encode($bulk).'<br/>';
            echo '-'.json_encode($writeConcern).'<br/>';
            
$writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, $writeConcern);
            $this->debug(false);
            $this->numRows = $writeResult->getMatchedCount();
            return $writeResult;
        }

        /**
         * 数据库日志记录(仅供参考)
         * @access public
         * @param string $type 类型
$writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, $writeConcern); 这行报错
最佳答案
评论( 相关
后面还有条评论,点击查看>>