I’m looking for a little help and guidance on creating a league table from entries in a database, because of other requirements it is not possible to update the entry for the person in the database. So there is going to be multiple rows for the same person I would then like to add up the points for that person. Around ten people will be apart of the league and the total number of rows will be no more than one hundred so I don’t think there will be to much overhead on the database plus the site is never going to be main stream just the 10 members will be visiting.
I was thinking about doing a select statement and then doing a while loop going through all the records, then a for statement for each row that equals the name adding the points together.
Is it a case of writing out the results such as:
[PHP]$name1 = Tom
$name2 = Ste [/PHP]
Then doing something like:
[PHP]$i = 1
foreach ($row[‘name’] = $name{$i}; $i++)
{
‘add up points here
}[/PHP]
Thank you for your help
Tom