Home > Backend Development > PHP Tutorial > 弱弱的问一下,怎么调用一周新闻?

弱弱的问一下,怎么调用一周新闻?

WBOY
Release: 2016-06-23 14:38:25
Original
832 people have browsed it

弱弱的问一下,怎么调用一周新闻?
不是当前周的,当前的查询7天内发布的就是了。
我要的是上周的,或者上上周的,给个思路,如果是按照时间段查询,那查询应该怎么写?

很多网站都实现了这个,我也想做一个。


回复讨论(解决方案)

时间段字段是datetime 还是timestamp类型的?

datetime 类型,请给一个实例

我要做一个周刊,一周为一个节点,可以让用户翻看上周的新闻,以及上上周的新闻。

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template