开发者

Updating a mySQL column

开发者 https://www.devze.com 2023-01-04 17:55 出处:网络
I would like to update a mySQL column, basically I would like to get a specific user in the DB, and then add the number I have to the number in the DB column.

I would like to update a mySQL column,

basically I would like to get a specific user in the DB, and then add the number I have to the number in the DB column.

So say 开发者_StackOverflow社区for instance user 12345 has 55 points, and I wanna add 25 points to his score, how would I go about updating the points column to reflect 80?

Thanx in advance!


UPDATE scoreboard
SET points=points+25
WHERE user=12345


UPDATE scores SET
points = points + 25
WHERE id = 12345;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号