如何将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" } } });
答案 0 :(得分:0)
检查下面用于连接mongodb和php的代码。
set