Good morning, everyone. If someone would be so kind to help me on a few things.
I'm doing a Bowling PHP Project, and I want to display a schedule(round-robin tournament style) of teams playing against one another each week, and I want to have some codes for that. Here's my table of the game schedule from the database.
[gameschedule table]()
The fields are from left to right: gameId(Primary Key), team1Id, team2Id, daySet, laneSetTeam1, laneSetTeam, averageTotalTeam1, averageTotalTeam2, and weekId.
I want to write a query and some codes, so I can display them in a Table like this.
[DAY TAKEN -- TEAM 1 -- TEAM 2 -- LANE FOR TEAM 1 -- LANE FOR TEAM 2 -- TEAM 1'S AVERAGE -- TEAM 2'S AVERAGE]
Now, I've already started by putting in "SELECT team1Id, team2Id, daySet, laneSetTeam1, laneSetTeam2, averageTotalTeam1, averageTotalTeam2 FROM gameschedule g WHERE weekId = '1';"
That will display the first week, and which teams are playing against each other, as well as which lanes they're on, as well as their combined average total for that team.
Once I get enough code information, I'll be good from there.
Second, the game recaps.
[recapP1]()
[recapP2]()
[recapP3]()
The fields are from left to right: gameId(primary key), teamId, laneSet, playerName1, playerName2, playerName3, oldAverageP1, oldAverageP2, oldAverageP3, oldHandicapP1, oldHandicapP2, oldHandicapP3, game1P1, game2P1, game3P1, game1P2, game2P2, game3P2, game1P3, game2P3, game3P3, totalP1, totalP2, totalP3, handiTotalP1, handiTotalP2, handiTotalP3, teamPointsWon, matchPointsWon, and totalPointsWon.
I want to try to display it like this for each team:
(RecapBoard)()
And this is how I started from this one: "SELECT r.teamId, laneSet, playerName1, playerName2, playerName3, oldAverageP1, oldAverageP2, oldAverageP3, oldHandicapP1, oldHandicapP2, oldHandicapP3,
game1P1, game2P1, game3P1, game1P2, game2P2, game3P2, game1P3, game2P3, game3P3, totalP1, totalP2, totalP3, handiTotalP1, handiTotalP2, handiTotalP3,
teamPointsWon, matchPointsWon, totalPointsWon, t.teamName FROM recapgames r, teams t WHERE gameId = '1' AND r.teamId=t.teamId";
This will show up one of the teams, and the scores they've played.
Again, once I know the information that you give me, I will take the rest from there.
Please answer this ASAP. This project is due tomorrow morning. I already got the rest done.