Sports scores page structure question

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Locked
smk17
Forum Newbie
Posts: 3
Joined: Tue Feb 03, 2009 8:00 am

Sports scores page structure question

Post by smk17 »

I'm quite new to PHP and mysql but I am studying my butt off.

I run a website dedicated to boys high school basketball in the New York area. Right now it is 100% static.

The area I have questions on are the schedule pages.

There are 70 teams that I cover. I want each team to have their own schedule page for the upcoming season. Right now those schedules are in tables on the html page, each on their own page and I manually create them each season and also manually enter the game scores after the game takes place. Since two teams play each other, I have to open team A's page and team B's page and manually type in these scores.

What I'd like to happen.

I've created a database that, for example, has a table in it called "candor_schedule". It has 7 columns of DAY OF WEEK, DATE, TIME, H/A, OPPONENT, VARSITY_SCORE, JV_SCORE.

I have been able to figure out how to create a form where I can enter the schedule, hit submit and have it populate the database and then I have a web page set up where the database info feeds into that page. That I have figured out. Of course I do not enter the game scores yet because they haven't been played yet.

And since I have to fill the schedule table out before the season starts, I need to go back and enter the game scores weeks later into the same table? But this is not the correct way to do this I know.

I'd like to have a form where I can enter the game (both teams, both scores, and then that info gets fed into each teams schedule, so I don't have to open up both teams pages, I can do it once from one place.

Can someone guide me in the right direction and try to explain the structure that might work? Do I need to make another table for the scores? And do I need a table for each team?

Here is the static page of one of the schedule pages: http://section4hoops.com/pop/iac_schedu ... ndor_s.htm

And here is the dynamic page test: http://section4hoops.com/php_test/index.php

Thanks for any help
Steve
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Sports scores page structure question

Post by Ollie Saunders »

You want to know what database structure to use for storing a team's match scores, along with the match schedules you already have?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Sports scores page structure question

Post by John Cartwright »

Duplicate. Locked.
Locked