Help with code to remove a list of loot drops.
I am looking for a way to remove a large list of items from the lootdrop tables so each time I update the database, I can run this script/command. An example is, currently, non-visible defiant gear was left in the loot drops (ie. Combatant's and Adept's), while visible gear was removed and added to global loot (ie. Crude Defiant, Simple Defiant, etc.). I want to finish removing those and will add those manually to global as well.
I read around the forums, and found a way to search for a word or phrase, it would list all matching items in Heidi and in turn, I would have to manually select and delete all offending items. If possible, I would like it to automatically delete all from a list I create. Is there a reasonable way of doing this? |
Code:
DELETE FROM lootdrop_entries |
Thanks, I wasn't expecting so simple. Had I wrote it I would have used =. Is there an easy explanation for why you use in for this situation? Still learning...
|
The in refers to the stuff in the ( )... For some reason I was expecting a deeper meaning but it was simply straightforward.
|
You can even put another query inside the where clause parentheses :)
Just make sure the query returns a list of single field results. |
Quote:
|
Code:
DELETE FROM `lootdrop_entries` |
Also, if it's something you think you might want to undo someday...make use of "disabled_chance" field instead of deleting them all:
Code:
UPDATE lootdrop_entries |
All times are GMT -4. The time now is 12:31 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.