在 php 的 stackoverflow 上,像这里这样的成就系统?

问题描述:

从概念上讲,如何使用 PHP 和 MySQL 为网站编写成就系统?

Conceptually speaking how would one go about writing an achievement system for a website using PHP and MySQL?

是否唯一真正的方法就是不断地执行 MySQL 查询来测试成就等?

Is the only real way of doing it is to constantly do MySQL queries to test for achievements and such?

您可能想考虑在 meta 上提出类似的问题,看看 Jeff 是否愿意分享他在这个领域的经验教训.如果你这样做了,问题应该特别是关于 SO 处理问题的方式.然而,这个问题对于这个网站来说是一个完全有效的问题(因为它询问的是创建一个新项目,灵感来自于在 SO 上所做的事情).

You might want to consider asking a similar question on meta, to see if Jeff is willing to share any of his lessons learned in this arena. If you do, the question should be specifically about the way SO approached the problem. This question, however, is a perfectly valid question for this site (since it is asking about created a new project, inspired by what was done on SO).

不过,我怀疑 SO 团队有一项工作,它会定期运行一组查询来寻找要授予的新徽章,然后授予它们.这就是为什么在采取行动赢得徽章后不会立即授予徽章的原因.

I suspect, though, that the SO team has a job that periodically runs a set of queries to look for new badges to award, and then awards them. This is why badges aren't awarded immediately after the action is taken to earn them.