louigui0224 Posted May 19, 2017 Posted May 19, 2017 (edited) is there anyway to change all the refine of all the items of all the accounts in mysql or phpmyadmin? Edited May 20, 2017 by louigui0224 Quote
0 Ninja Posted May 19, 2017 Posted May 19, 2017 (edited) UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id SET inventory.refine={CHANGE THIS VALUE TO DESIRED REFINE} WHERE item_db_re.type IN ({PUT ALL ITEM TYPES SEPARATED BY COMMAS}); https://github.com/rathena/rathena/wiki/Custom_Items refer to the link on item types. this method will only work if the person who owns the item is offline. Edited May 19, 2017 by Ninja 1 Quote
0 louigui0224 Posted May 19, 2017 Author Posted May 19, 2017 so for example since the armor is type 4 i should put UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id SET inventory.refine=0 WHERE item_db_re.type IN ({4); is this correct?? by the way im using pre-re...should i use item_db_pre??? @Ninja Quote
0 Jey Posted May 19, 2017 Posted May 19, 2017 I'd like to suggest to do these database updates when the server is offline. Don't forget to make a backup before you apply your changes. And test them on a local copy. You can write all your UPDATE-Statements in a sql-file like refineupdate.sql and apply them at once with the command mysql -u user -p database < refineupdate.sql And yes you can also use the item_db_pre. Don't forget there are multiple tables for items: storage, cart_inventory, inventory, etc. Quote
0 louigui0224 Posted May 19, 2017 Author Posted May 19, 2017 what do you mean by " And yes you can also use the item_db_pre. Don't forget there are multiple tables for items: storage, cart_inventory, inventory, etc. " @Jey Quote
0 louigui0224 Posted May 19, 2017 Author Posted May 19, 2017 so before changing eerything. UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id(So just change item_db_re to item_db_pre?) and everything is ok beside from changing the cartinventory and storage? SET inventory.refine=0 WHERE item_db_re.type IN ({4); Quote
0 Ninja Posted May 19, 2017 Posted May 19, 2017 Yes. For more info. Please look at some SQL basics cheatsheet. https://www.w3schools.com/sql/ Quote
0 louigui0224 Posted May 20, 2017 Author Posted May 20, 2017 (edited) This is what i put...and it says 0 row affected...and when i tried to search there are still +20 items in the inventory...and when i logged ingame the items still hase refines. UPDATE inventory INNER JOIN item_db ON inventory.nameid = item_db.id SET inventory.refine=0 WHERE item_db.type IN (256,32,2,1,64,16,512); Bump. already done i type just a very simple code.. UPDATE inventory SET inventory.refine=0 UPDATE cart_inventory SET cart_inventory.refine=0 UPDATE storage SET storage.refine=0 Edited May 20, 2017 by louigui0224 Quote
-1 Ninja Posted May 19, 2017 Posted May 19, 2017 He means that you will be using item_db_pre instead of item_db_re and that you have to think about how to modify the sql command that I gave you to also update item refines which are located in other tables such as storage, cart_inventory, etc. Quote
Question
louigui0224
is there anyway to change all the refine of all the items of all the accounts in mysql or phpmyadmin?
Edited by louigui02248 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.