gpt4 book ai didi

php - 如何创建用户历史记录?

转载 作者:行者123 更新时间:2023-11-29 07:13:43 25 4
gpt4 key购买 nike

我想创建一个用户历史功能,允许向用户显示他们做了什么。例如:对广告发表评论、发布广告、对广告投票等。

我该怎么做呢?

I was thinking about... in my site, when they log in it stores their user_id ($_SESSION['user_id'])

  1. so I guess whenever an user posts an ad(postad.php), comments(comment.php), I would just store in a database table "userhistory" what they did based on whenever or not their user_id was activate.
  2. When they comment, I store the user_id in the comment dbc table, so I'll also store it in the "userhistory" table.
  3. And then I would just queries all the rows in the dbc for the user to show it

我可以采取任何步骤/改进吗? :)

最佳答案

查看媒体 wiki 模式的统计和日志记录部分。您可以实现与此类似的东西。

http://upload.wikimedia.org/wikipedia/commons/4/41/Mediawiki-database-schema.png

关于php - 如何创建用户历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2823913/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com