Table standing

hallo guys ,first i want to say that im fairly new to Php and Mysql .My problem is,im making a site for soccer predictions , and i want to show table standings of the leagues .First i want to ask you how i can do it to upgreade dinamycilly the tables .I created 2 tables ,one with the standing and the other with with result , i will show you the code
$sql=mysql_query(‘SELECT * FROM res WHERE match_id=10’);
while($row=mysql_fetch_assoc($sql))
{
$home_team=$row[‘home_team’];
$away_team=$row[‘away_team’];
$home_team_goals=$row[‘home_team_goals’];
$away_team_goals=$row[‘away_team_goals’];

}
if($home_team_goals>$away_team_goals)
{
$s=mysql_query('UPDATE ')
}
this is not finished ,but you get the idea i will update the standing table with a lot of ifs ,the question is can i do it more simple ?
My other question is because i never uploaded site in internet ,will i have acces to my tables in mysql so i can upgrade them all the time ?