I'm not sure if I should post this in PHP or MYSQL, oh well.

I have a nfl predictions site, and I want to dynamically update my stadings from another table in the database.

I have one table (called: matchData) with all of the matches with the following fields:
lid
matchid
matchdate
hometeam
awayteam
homescore
awayscore
week

the i have another (called: teamstandings) with the following fields:
lid
name
win
loss
pf
pa
div (i set 1 for AFC and 2 for NFC)
conf (i set 1 for EAST and 2 for WEST and 3 for North and 4 for South)

What I want is to have a standings page that does the following

first it looks at all the MatchData info and updates TeamStandings with the Wins, Losses, Points For, and Points Against.

Then I want my standings page to take from the table TeamStandings table and print out the teams like so:

http://www.nfl.com/standings/

Conference:
Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...

next Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...

next Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...

next Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...


next Conference:
next Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...

next Division:
team ( win, loss, pf, pa)
next team...
next team...
next team...


and so on...

Is this possible?

Where and when exactly are you updating the matchdata? Why not update the team standings then? then our page need only pull from the table.

Yes, anything is possible though. I'm assuming you have other tables in your db? If so, you could also get the stats without having the teamstanding table if you use your matchdata table in conjunction with a teams and division table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.