Distributing items through phpMyAdmin
-----
| Author | Message | |
|---|---|---|
|
schwpz |
||
| Sun Dec 17, 2006 1:45 pm Post subject: Distributing items through phpMyAdmin | ||
|
Hello everyone! ^^
I have the upgraded version of the shop mod installed, and I was wondering how I would go about if I want to give out a specific item to all the users on my forum though phpMyAdmin. Say I have an item named 'kitty' that I'd like to give out to all my forum members, but handing it out manually to more than 10k accounts would be quite a task for a single human being. ^^; So my question is if there is a way to make this automatically instead? I don't really need any fancy script or anything, a simple query I can manually run through the database is plenty enough for me. Just something crude and dirty that makes the item 'kitty' automagically appear in every user's inventory. I'd also like to express my gratitude for the upgraded effect shop. I have had it on my board for quite a while now, and it's working great without any problems. Thanks for reading this, and keep up the good work everyone! |
||
|
Thoul |
||
| Sun Dec 17, 2006 3:45 pm Post subject: re: Distributing items through phpMyAdmin | ||
|
Unfortunately this can't be done with a simple query due to the way items are stored in the new shop. You have to select the user ids and item details, and then build an insert query for each user. With 10k users, you're looking at 10k queries at least.
I will make a script to give everyone an item though. I know I'm going to need that eventually myself, so I'm glad you brought the subject up. |
||
|
schwpz |
||
| Sun Dec 17, 2006 4:24 pm Post subject: | ||
|
Thank you so much for your quick reply Thoul, I sincerely appreciate it.
I should have figured distributing items wouldn't be that simple, but a girl can wish, right? Happy holidays! |
||
|
Thoul |
||
| Thu Dec 21, 2006 9:29 pm Post subject: re: Distributing items through phpMyAdmin | ||
|
I have this done now, except for a little bit of documentation. I'll try to get it all together and upload it this weekend.
|
||
|
schwpz |
||
| Fri Dec 22, 2006 4:45 am Post subject: re: Distributing items through phpMyAdmin | ||
|
That was quick! Thank you so much for working on this.
So really, thank you for doing this! |
||
|
Thoul |
||
| Fri Dec 22, 2006 4:25 pm Post subject: re: Distributing items through phpMyAdmin | ||
|
No problem.
I've put the script up for download, you can find it here: http://www.phpbbsmith.com/hacks/item-giver.php |
||
|
schwpz |
||
| Thu Dec 28, 2006 7:33 pm Post subject: | ||
|
Just wanted to let you know that I have tested this script, and it worked perfectly. I especially liked the option of being able to give items to activated accounts only, since the distribution of items to unactivated accounts has actually been a concern for several users on my forum. So again, thank you so much for your fast and fantastic work!
|
||
|
Thoul |
||
| Sat Dec 30, 2006 9:12 am Post subject: re: Distributing items through phpMyAdmin | ||
|
No problem, I'm glad you like it. I tried to include a couple of features that I thought might be useful, I'm glad that came in handy for you.
|
||
Page 1 of 1