Database Architecture for “Badge” System & Arbitrary Criteria (MySQL/PHP)

前端 未结 7 1223
一生所求
一生所求 2020-12-12 10:31

Quickie-Question:

To summarize, I\'m a little confused as to how I would design such a database that allows indefinite badge-rule creation without requiring structu

7条回答
  •  离开以前
    2020-12-12 10:51

    I would not create an increment for the edit badge. I think you should have a job running in the background and count() the numbero of post edited for members that haven't the badge of editing yet. When you see that the count is over the range you want, you add an entry in the database that tell that the user have the badge.

    I think it's about the same for other badges. Try to limit the number of writting and do not write directly the count of the badge information in the user table. Use a table that will contain badge information and link it to the user table.

提交回复
热议问题