To keep it short and simple, im making a fifa score guessing app,
working with 4 tables :
- Matches (contains info about the first division matches)
- Predictions (contains a list of predictions made by users)
- Ranking (only contains the email and a points counter defaulted to 0)
I have a button connected to an edit form that, when clicked, modifies the selected team's winning team, and score columns based on the user's input (works fine).
What i want to add, is every time said data is modified, it also checks for user predictions with the same match number in the predictions list, and checks if the user guessed the scores / winning team correctly.
if he only guessed the winning team, he gets a point, and if he guessed the scores correctly he gets two points in total.
And then said points should be summed up with the points he currently has in the ranking list.
EX:
If the user guessed the first match's winning team correctly, but was wrong in the scores, we add +1 to his points.
If the user guessed the first match's winning team correctly, and the scores aswell, we add +2 to his points.
If anyone has any suggestions, please let me know

Report
All responses (
Answers (