Home > Backend Development > PHP Tutorial > 未审核的帖子在主页显示出来了

未审核的帖子在主页显示出来了

WBOY
Release: 2016-06-13 10:33:55
Original
1111 people have browsed it

未审核的帖子在首页显示出来了
如题,有新帖发出时,还在审核的帖子在首页显示帖子主题的地方也出现了,点上链接后出现“你访问的主题已删除或者正在审核”,有没有方法让未审核的主题不出现在首页呢?请各位高手赐教!

------解决方案--------------------
可以,查找到数据未审核字段.
然后在首页获取帖子列表的sql后面 where 子句后面再加个条件,用来过滤未审核的帖子.
------解决方案--------------------
在数据库里给帖子增加一个 审核 字段,帖子状态默认 未审核,比如字段里的值置为0,审核过后,就把table里的审核字段的值改掉,比如改成1。

Related labels:
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