$map = "function() {
for (var i = 0; i < this.items.length; i++) {
emit(this.name, this.items[i].$param); } }";
$reduce = "function(name, sum) { return Array.sum(sum); }";
$opt = "{ out: 'totals' }";
$db->execute("db.stores.mapReduce($map, $reduce, $opt);");
报错信息:
Cannot run mapReduce command from eval()
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
走同样的路,发现不同的人生