I tried many different ways to solve this problem from this forum and many others. I can not find a solution to this problem or any documentation that will give me a direct answer.
I wondered if you could take a look at it for me.
thanks
PROBLEM:
I have a database with the following tables participant_scores league rounds
Currently, I can display the scores of one round, one round at a time ... which is exactly what I want. But I also want to display the score that each participant received for all rounds. Let's say we have 2 rounds. I want the result on the results screen to look something like this:
Currently viewing league 20, Round 1
of 2:
User Name | Score | Total Score
Tom | 10 | 200
James | 50 | 300
-
=
= , .
Mysql . , 100 , - , .
→ league_participants_query (mysql)
SELECT
participants.participant_id,
participants.participant_name,
participants.participant_gender,
classes.class_name,
schools.school_name,
participant_scores.participant_score,
participant_scores.participant_score_id
FROM participant_scores, participants, classes, league_schools, schools, leagues, rounds
WHERE leagues.league_id = 51
AND rounds.league_id = 51
AND rounds.round_id = 25
AND participant_scores.round_id = 25
AND league_schools.league_id = 51
AND schools.school_id = league_schools.school_id
AND classes.school_id = schools.school_id
AND classes.year_group_id = leagues.year_group_id
AND participants.class_id = classes.class_id
AND participant_scores.participant_id = participants.participant_id
GROUP BY participants.participant_id