mysql 获取当天发布的信息的语句
程序员文章站
2023-12-15 11:32:46
复制代码 代码如下:select * from `p8_memberdata` where regdate between (unix_timestamp(now())-8...
复制代码 代码如下:
select * from `p8_memberdata` where regdate between (unix_timestamp(now())-86440) and now()
select * from `p8_memberdata` where date_format(from_unixtime(regdate),'%y-%m-%d')= date_format(now(),'%y-%m-%d') order by uid desc
第一条最好显示过去24小时过去1周等
第二条获得当天信息