随笔分类 -  数据库

摘要:mysql提供了两个函数: 如果要查询当天的订单的记录: [plain] select count(*) from b_order Where date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m- 阅读全文
posted @ 2016-06-03 13:26 God丶魔多 阅读(23389) 评论(0) 推荐(0)
摘要:select * from tablename group by name;如果是select * from tablename group by name,age;那么查询的是满足name和age都不重复的记录。 阅读全文
posted @ 2016-04-28 09:29 God丶魔多 阅读(1165) 评论(0) 推荐(0)
摘要:查出来的时间格式为2016-04-26 00:00:00这种 那么以该时间戳为条件查询也不在话下,如 阅读全文
posted @ 2016-04-26 16:54 God丶魔多 阅读(221) 评论(0) 推荐(0)