I have a script that gets the average strenght of a team out of a database like this:
$query = mysql_query("SELECT ROUND(AVG(w_staerke),2) AS w_staerke FROM ".$conf['db_prefix']."_spieler WHERE verein_id='".$row['id']."'");
$data = mysql_fetch_array($query);
$strengt = $data['w_staerke'] ? $data['w_staerke'] : 0;
mysql_free_result($query);
This takes the average of all players.
This is a soccer game so of course there are only eleven players in the starting lineup.
Usually it is one goalie, four defenders, three midfield and three attackers.
So what I need is the average strenght of this formation for each team.
I can supply the full script so you can work with that.
The PHP file gets the info from the database and there is a TPL file that displays it. This is what I need for this as well.
Please DO NOT send any references unless I ask for them.
Thx