I'm trying to write a custom script that will update a users vbux points from the user table. Basically in my php file I have the below code. Which works but does so in a wierd way.
Lets say user A has 20 points. The below script adds 10 points to their table to make a
total of 30 points. However when I run it, the user now has 50 points because it takes 20 + 20 + 10. Is the SET statement not correct?
Code:
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET vbbux = vbbux + 10
WHERE post_groan_times > 0
");