一次更新2列?
我尝试了以下语句,这不行:
UPDATE exercises SET times_answered = times_answered + 1 AND av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1) WHERE name = ?
使用逗号而不是你的“AND”:
UPDATE exercises SET times_answered = times_answered + 1,av_answeringTime = av_answeringTime + ( (av_answeringTime / (times_answered) ) + ?) * (times_answered + 1) WHERE name = ?