Can we do the following:
updateMemberData($ID_MEMBER, array('posts' => '+30'))
To add 30 more posts instead of single increments like +.
try it and see what happens
What it does is replace your posts with that number :(
Can we do a foreach statement based on the number you want to add to the user?
OR, perhaps change updateMemberData the function itself to recognize +#
in smf 2.0 i see code like this
updateMemberData($id_member, array('posts' => 'posts + ' . $posts));
What that's doing is using the database column "post" and adding the value of the variable $posts to the column value, in that case, you're letting SQL do the math.
Quote from: vbgamer45 on September 02, 2016, 02:01:49 PM
in smf 2.0 i see code like this
updateMemberData($id_member, array('posts' => 'posts + ' . $posts));
That works on 1.x too, thanks
Glad to help