mongodb
zhudiwoaini
这个作者很懒,什么都没留下…
展开
-
iframe自适应高度
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml"> function dyniframesize(down) { var pTar = null; if (document.原创 2012-03-19 16:57:11 · 386 阅读 · 0 评论 -
node.js mongodb aggregate 分组时时间差8小时的解决方案
由于mongodb中的ISODate时间比北京时间相差了8个小时。因此在做统计的时候根据时间查询的时候就需要把这个时间加起来才可以。代码如下:以下是node.js的写法 Collection.aggregate({ $match: { $and: [{ entertime: { '$gte': new原创 2017-03-02 16:54:31 · 1859 阅读 · 0 评论 -
mongodb 聚合aggregate 乘法
1.mongodb统计数据时需要两列相乘并且将相乘的结果求和的功能2.代码:db.shopprilegerecoding.aggregate([ {$match :{$and:[{createtime:{'$gt':new Date("2017-01-01")}},{createtime:{'$lt':new Date("2017-12-31")}}]} }, {$group :原创 2017-02-15 13:36:45 · 4969 阅读 · 0 评论