Hello, to make a long story short I ran a command to give everyone an item on my site, however I kept getting errors after I ran the query in phpmyadmin so I figured the command didn't work. However since I ran the command more than once it looks like it gave everyone the item multiple times. Is there a command I can run to subtract the item I just gave them? Here is the query:
UPDATE site_users SET user_items = CONCAT(user_items, 'ßThanksgiving TurkeyÞ') WHERE user_karma_count > 0;
What would be a command to remove two of those items from everyone's inventory?
Considering i do not know how your database is setup, and i have no idea if i even got the format of your inventory list correct, i don't think that is the best idea, but here it is anyways. I take no responsibility for damaged databases
UPDATE site_users SET user_items = REPLACE(user_items, 'ßThanksgiving TurkeyÞßThanksgiving TurkeyÞ','ßThanksgiving TurkeyÞ');
Edit: Also, this does not take into account if someone added an item to their inventory between the two times that you added the turkey.
Thanks, I ran the command and it worked somewhat. Instead of 3 items it now displays 2. Any way to remove the second one so that it only appears once? Wait, maybe if I ran it again it would remove the second one.