Try formatting your SQL Query to see what line its actually on as LINE 1 is your entire query it isnt much help. Also trying this in PHPMyAdmin may help you.
$result7 = mysql_query ("UPDATE results_comptable SET
comp_run_id = '$comp_run_id',
team_pld = '$team_pld',
team_w = '$team_w',
team_d = '$team_d',
team_l = '$team_l',
team_b = '$team_b',
team_f = '$team_f',
team_a = '$team_a',
team_pts = '$team_pts',
team_diff = '$team_dif'
WHERE team_id = $team1_id
AND comp_run_id = $comp_run_id
") or die("INSERT error6: ".mysql_error());