Problems Creating an Online League System

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Follyfoot
Forum Newbie
Posts: 2
Joined: Fri Apr 11, 2008 12:35 pm

Problems Creating an Online League System

Post by Follyfoot »

Hi all,

I am currently tring to create an online league system for a 5-a-side football league that I run but am having some serious problems trying to the the site to display the results.

here are my tables

tbl_league
-----------
leagueID
leaguename
season

tbl_team
------------
teamID
leagueID
teamname

tbl_game
------------
gameID
homeoraway
goalscored
fixtureID

tbl_fixture
-----------
date
time
location

The problem I'm having is trying to create a query that will allow me to show the results of all games in a league.

for example;

Follys Team 1 vs Randoms Team 5 - played on 21 May - 3pm

To me it seems really difficult because you have the goals scored for each team in different rows.

If anyone could help that would be brilliant.

Thanks alot

Folly
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Problems Creating an Online League System

Post by onion2k »

Your database doesn't seem to contain enough information. How are you storing which team played in each game? And how do you know which league the game was in?
Follyfoot
Forum Newbie
Posts: 2
Joined: Fri Apr 11, 2008 12:35 pm

Re: Problems Creating an Online League System

Post by Follyfoot »

hmmm.... thats really seems to be the root of the problem I'm having, I'm really not sure how to store the which teams played in which fixture
Post Reply