News:

Wondering if this will always be free?  See why free is better.

Main Menu

updateMemberData question

Started by Biology Forums, September 02, 2016, 12:27:06 AM

Previous topic - Next topic

Biology Forums

Can we do the following:

updateMemberData($ID_MEMBER, array('posts' => '+30'))

To add 30 more posts instead of single increments like +.

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Biology Forums

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 +#

vbgamer45

in smf 2.0 i see code like this
updateMemberData($id_member, array('posts' => 'posts + ' . $posts));
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Matthew K.

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.

Biology Forums

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

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: