I run a site based on Tottenham Hotspur, an English football team. For every match, I input all the info... who played, who scored etc, who was booked, ratings for each player.
What I want is a table to be created that has all this info for every player in one handy place. So, it would look something like this:
player goals apps av. rating bookings
Poyet 5 27 8.45 3
Rebrov 11 39 7.24 0
Sheringham 27 41 9.24 6
and so on....
Now, the info is stored thus:
table: fixtures_goals
rebrov 27 mins
poyet 39 mins .........
table: fixtures_apps
poyet
sheringham
rebrov
carr
sheringham.......
table: ratings
2001-08-18 sheringham 8
2001-08-18 poyet 7
2001-08-18 rebrov 9.........
table: fixtures_bookings
poyet
sheringham
poyet.........
What I'm trying to do is very difficult to explain, but I hope you get the picture.
What I'm having a problem with is the average rating. I can't work out how to create the average in the mySQL statement.
Any help whatsoever would be greatly appreciated.