Skip to content

Item Mods changes in module #4576

Answered by TeoTwawki
Aeisu asked this question in Q&A
Oct 2, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

worth noting for tables with a primary key that REPLACE INTO is a thing that can be used.

REPLACE INTO `item_mods` VALUES (13295,455,25); -- Song Spellcasting -25%

the original insert gets delated and replaced by the one specified

in many cases that'll be simpler to write than updates. But you can use multiple UPDATE lines with multiple values each like:

UPDATE item_mods SET value = 25 WHERE modId = 455 AND itemID = 13295; -- update song spellcasting
UPDATE item_mods SET value = -1000 WHERE modId = 160 AND itemID = 13295; -- update Damage taken
UPDATE item_mods SET value = 350, modId = 9999 AND itemID = 13295; -- add mod that didn't exist in upstream

in the case of item_mods, the primary …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by TeoTwawki
Comment options

You must be logged in to vote
3 replies
@TeoTwawki
Comment options

@Aeisu
Comment options

@TeoTwawki
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants