【发布时间】:2011-08-30 14:13:41
【问题描述】:
我想知道如何将数字从一个表格字段添加到另一个表格字段,例如,我有:
Table name = Game:
opponent1(name of row) vs. opponent 2 - score1 = 25 - score2 = 20
我希望表“团队”使用以下内容自动更新:
Table name = Teams:
Opponent1:
Points in favor = 25
Points against = 20
Opponent 2:
Points in favor = 20
Points against = 25
那会是什么代码?会不会(有一些伪代码):
- 如果 score1 大于 score2
- 将 score1 添加到表“team”中的“pointsfavor”字段到对手 1
- 并将 $score2 添加到表“team”中的“pointsagainst”到对手1
有人可以帮帮我吗?
【问题讨论】:
标签: php mysql html phpmyadmin