SELECT * FROM `attendancealert` WHERE DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(`AlertTime`)),'%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') //先将日期格式转成时间戳 然后时间戳转成Y-m-d的时间格式然后 和今天的Y-m-d的时间进行对比 AND DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(`AlertTime`)),'%
BEGIN DECLARE sChildList VARCHAR(4000); DECLARE sChildTemp VARCHAR(4000); SET sChildTemp =cast(rootId as CHAR); WHILE sChildTemp is not null DO IF (sChildList is not null) THEN SET sChildList = concat(sChildList,',',sChildTemp); ELSE SET sChildList =
SELECT T2.id, T2.name FROM ( SELECT @r AS _id, ,,@stop) as stop, (SELECT @r := p_id FROM goods_class WHERE id = _id) AS p_id, AS lvl FROM (, , ) vars, goods_class h ) T1 JOIN goods_class T2 ON T1._id = T2.id ORDER BY T1.lvl DESC
本文首发于个人博客https://kezunlin.me/post/107cbcbb/,欢迎阅读! using boost.date_time to get time in millisecond microsecond level Guide format flags second millisecond microsecond nanosecond Format Flags %f Fractional seconds are always used, even when their valu
前言 因为业务要求api的一次请求响应时间在10ms以内,所以传统的数据库查询操作直接被排除(网络io和磁盘io).通过调研,最终使用了bieset,目前已经正常运行了很久 *** bitset介绍 看JDK中的解释简直一头雾水,用我自己的理解概括一下 bitset的内部实现是long数组 set中每一个位的默认值为false(0) bitset长度按需增长 bitset非线程安全 *** bitset关键方法分析 /** * Sets the bit at the specified inde