【发布时间】:2010-10-01 11:39:59
【问题描述】:
$sql="update users_contain
set
wood_max = (Select building_production from building_level where merge_id=$subPrimaryKey and empire_id=$user_empireID) ,
iron_max = wood_max,
clay_max = wood_max
where user_id = $user_id";
现在有一个问题。
wood_max 是否总是比 Iron_max 和 Clay_max 先更新。所以用这种方式安全吗?? 当我知道它对所有三个字段具有相同的值时,我不想使用内部查询来更新 Iron_max 和 Clay_max。
【问题讨论】: