按时间查询数据(时间存储的格式是unix时间戳)

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

SELECT *
FROM `pre_common_member_log_w`
WHERE DATE_FORMAT( FROM_UNIXTIME( dateline ) , '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )
LIMIT 0 , 30

SELECT *
FROM `pre_common_member_log_w`
WHERE DATE_FORMAT( FROM_UNIXTIME( dateline ) , '%Y-%m-%d' ) = '2014-10-23'
LIMIT 0 , 30



SELECT DATE_FORMAT( FROM_UNIXTIME( dateline ) , '%Y-%m-%d' ) AS mytime, title
FROM `pre_common_member_log_w`
WHERE DATE_FORMAT( FROM_UNIXTIME( dateline ) , '%Y-%m-%d' ) = '2014-10-23'
LIMIT 0 , 30