时间:2021-07-01 10:21:17 帮助过:3人阅读
按时间查询数据(时间存储的格式是unix时间戳) 无 SELECT *FROM `pre_common_member_log_w`WHERE DATE_FORMAT( FROM_UNIXTIME( dateline ) , '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )LIMIT 0 , 30SELECT *FROM `pre_common_member_log_w`WHERE DA
按时间查询数据(时间存储的格式是unix时间戳) <无>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