如何将mongoDB shell查询转换为php

时间:2016-08-04 13:06:44

标签: php mongodb

如何将mongoDB查询转换为php

db.getCollection('xyz').aggregate({ $match: { 
$and: [ 
{ created_at: { $gt:new ISODate("2016-07-05"), $lt:new ISODate("2016-09-05") }, id: "1" } 
] 
} }, 
{ $group: { _id : "distance", sum : { $sum: "$distance" } } });

1 个答案:

答案 0 :(得分:0)

检查下面用于连接mongodb和php的代码。

set