Format for adding a second update to a query
For the query below, I would like to add the following action: update a column called "flag1" to be equal to a variable call开发者_JAVA技巧ed $uflag
. What is the correct format for that?
UPDATE submission SET votes_up = $votes_up WHERE submissionid = $id
Just like manual says
UPDATE
submission
SET
votes_up = $votes_up,
flag1 = $uflag
WHERE
submissionid = $id
http://dev.mysql.com/doc/refman/5.1/en/update.html
UPDATE submission
SET votes_up = $votes_up, flag1 = $uflag
WHERE submissionid = $id
精彩评论