Syntax error when doing an update to modify multiple fields using mysql
Can I modify the mysql syntax SET more of a sample script:
UPDATE login SET id='21' AND ip='789' WHERE nama='ariel'
Please corrected if I am wrong.
And
should be ,
UPDATE login SET id='21', ip='789' WHERE nama='ariel'
I don't think you should use AND
like that. Instead I think it should be something more like a list like this:
UPDATE login SET id='21',ip='789' WHERE nama='ariel'
AND
is typically used as part of a WHERE
clause, not in the list of fields to be updated.
精彩评论