Author Topic: Need a code to modify many inventories at once...  (Read 4410 times)

Offline Syndel

Need a code to modify many inventories at once...
« on: September 05, 2006, 03:02:05 am »
Can that be created? We give monthly points to members and is hellish to alter one by one, account by account.

Offline Daniel15

Re: Need a code to modify many inventories at once...
« Reply #1 on: September 08, 2006, 09:19:55 pm »
So what do you want to modify? A specific item? A member's credit count?
There was a post at http://www.daniel15.com/forum/index.php?topic=112.0 which explains how to deduct points automatically... Maybe you'll want to do something similar to that, except give points?

Offline Syndel

Re: Need a code to modify many inventories at once...
« Reply #2 on: September 09, 2006, 01:10:30 am »
We give them points monthly... but they are like 240 people :)
So I have been going one per one cause the values are different too. It is according to how many games they play etc.

Uh, Daniel, I am having CronJobs problem too... it is not creating the file it was supposed to. Check this out:

/bin/sh: /home/khaotikd/public_html/www/interest_log.htm: No such file or directory

Offline Daniel15

Re: Need a code to modify many inventories at once...
« Reply #3 on: September 10, 2006, 04:41:18 pm »
About the cronjob thing, try manually creating an 'interest_log.htm' file yourself.

Quote
We give them points monthly... but they are like 240 people 
So I have been going one per one cause the values are different too. It is according to how many games they play etc.
Hmmm... The values are different? I'm not really sure, then ;)

Offline Phydeaux

Re: Need a code to modify many inventories at once...
« Reply #4 on: September 11, 2006, 09:11:49 am »
Assuming that you have a table with a member's id column that also contains the "number of games played" (or perhaps it's in the SMF members table), load all the members from that table into an array. i.e. $mymembers[ ].  Enter a for loop $x, $x < count($mymembers[ ]), $x++ and update each record in the SMF members table  SET money=money+(your forumla for counting the increase) WHERE `ID_MEMBER` = $mymember[$x][member's id] etc.

You can add a link to the function in the menu of the Admin Manage Members section and just click it to do the deed.

If you're unable to write the code, if you'll post all the pert. db info up, as soon as I have the chance I'll do my best to write it up for you.

Phydeaux

Offline Syndel

Re: Need a code to modify many inventories at once...
« Reply #5 on: October 15, 2006, 01:11:32 pm »
OMG....
o.O
You spoke greek to me... and I have a hell of a huge ammount of members... 314 or something like that... that is why I asked... they play board games... not like Arcade or something... so we count points... (many moderators for that) and then add to their Shop accounts... mannually.... one by one... using a fiction member to "Send Money"  to them... meh