Home > Backend Development > PHP Tutorial > 如何返回特定时间戳之前第一个帖子所在的日期的全天帖子?

如何返回特定时间戳之前第一个帖子所在的日期的全天帖子?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:39:46
Original
1127 people have browsed it

如题

数据库中日期使用 PHP(10位) 时间戳储存
想根据时间戳 请求 这时间戳之前第一个帖子所在日期的一整天帖子数据
请问如何获取?

表名 posts
时间戳 created int(10)

回复内容:

如题

数据库中日期使用 PHP(10位) 时间戳储存
想根据时间戳 请求 这时间戳之前第一个帖子所在日期的一整天帖子数据
请问如何获取?

表名 posts
时间戳 created int(10)

<code>SELECT @d := created FROM posts WHERE created = (@d - @d % (24*60*60));
</code>
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template