Current location: Hot Scripts Forums » Programming Languages » PHP » Displaying a team schedule and game recaps on MYSQL Query/PHP

Displaying a team schedule and game recaps on MYSQL Query/PHP

Reply
  #1 (permalink)  
Old
New Member
 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Displaying a team schedule and game recaps on MYSQL Query/PHP

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.
Reply With Quote

Featured Marketplace Scripts (view more)

Reply

Bookmarks

Tags
mysql, mysql_query, php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Programmer - AAA Next-gen Gaming Co. Ascendi Job Offers & Assistance 0 03-25-08 06:44 PM


All times are GMT -5. The time now is 08:48 AM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.