Reputation: 3042
There was a problem with an sql server and my voting system set back people 1 day. I want to make it up to them and give them 1 point increase to make up for the loss.
How would I go about doing that? I was thinking of this but I don't think it would work..
SELECT votepoints FROM vsystem where votepoints=votepoints+1
Upvotes: 0
Views: 56
Reputation: 1292
No. What you are saying is like search where the result equals the result plus 1. That won't be true.
You can UPDATE your table:
update vsystem set votepoints = votepoints + 1
...or get the results + 1 (without modifying the table):
select (votepoints + 1) as voteplus from vsystem
Upvotes: 3
Reputation: 106037
If you want to do a one-time fix, just do:
UPDATE vsystem
SET votepoints = votepoints + 1
This will add 1 to the votepoints
column for every row in the vsystem
table.
Upvotes: 2