Answer the question
In order to leave comments, you need to log in
How to implement a system of contributions and achievements like on Toster.ru?
Hello. Can you briefly describe how the system of contributions and achievements on the toaster is implemented? I would like to see exemplary Data Tables and a small description of the functionality. I will be very grateful!
Answer the question
In order to leave comments, you need to log in
You create a line with the "Otvets_user" parameters, enter all the user's answers into it, enter 0 or 1 in the "pravilni_otvet" column, get the number of answers with a value of 1, multiply this value by 10 - you get the number of points for correct answers, then enter it in the column table "user" check the number, if there are more, for example, 100, add the value 1 to the column "nagrada_1" (by default it should be 0), then iterate over all these rows and if "nagrada_1" = 1, display the achievement on his page .
This is how I understand. Perhaps everything is implemented much more complicated here. Names, of course, look in the translator.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question