hi all
my query is either going to be so simple i should of seen the answer myself or tax everyone trying to get the answer so here goes
i have a database that holds records for football teams
one table is set up so
team_id
team
for
against
goal_diff
points
now what i would like to do is have the goal_diff column update automatically when the scores are inputted on another table which holds results
i have the for and against columns filling ok i was wondering what the best way of filling goal_diff was
would it be a code written into the sql doc itself or would it be better done when the whole thing is outputted to a php page for viewing, this way would cut down on columns although speed is not essential in this operation as there are only ever 20 teams in this table.
Regards
my query is either going to be so simple i should of seen the answer myself or tax everyone trying to get the answer so here goes
i have a database that holds records for football teams
one table is set up so
team_id
team
for
against
goal_diff
points
now what i would like to do is have the goal_diff column update automatically when the scores are inputted on another table which holds results
i have the for and against columns filling ok i was wondering what the best way of filling goal_diff was
would it be a code written into the sql doc itself or would it be better done when the whole thing is outputted to a php page for viewing, this way would cut down on columns although speed is not essential in this operation as there are only ever 20 teams in this table.
Regards
Comment