Home  >  Article  >  Backend Development  >  怎么判断文章的读取状态

怎么判断文章的读取状态

WBOY
WBOYOriginal
2016-06-23 13:32:211055browse

请教一个问题:
我想用PHP做一个消息发布系统,数据库中有一个用户表和一个文章表,现在需要根据用户是否点击来判断某篇文章是否已读,我有3000多用户,如要要根据每个用户对一篇文章的读取状态来判断,那不是每篇文章得有3000多条数据,请教做这个系统的思路?


回复讨论(解决方案)

设一已读表,2 个字段:用户id 和 文章id
每当读取文章时,在此表中增加一条记录
凡不在此表的,就是未读

Statement:
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