对于下面的查询,我想添加以下操作:将名为“flag1”的列更新为等于名为$uflag
的变量。该格式的正确格式是什么?
UPDATE submission SET votes_up = $votes_up WHERE submissionid = $id
答案 0 :(得分:3)
就像手册上说的那样
UPDATE
submission
SET
votes_up = $votes_up,
flag1 = $uflag
WHERE
submissionid = $id
答案 1 :(得分:2)
UPDATE submission
SET votes_up = $votes_up, flag1 = $uflag
WHERE submissionid = $id