View Single Post
  #2  
Old 02-06-2016, 07:43 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Try this:
Code:
INSERT INTO `loottable_entries` (`loottable_id`, `lootdrop_id`, `multiplier`, `droplimit`, `mindrop`, `probability`)
SELECT lt.c1, lt.c2, lt.c3, lt.c4, lt.c5, lt.c6
FROM (SELECT DISTINCT `loottable_id` c1, '165862' c2, '1' c3, '1' c4, '0' c5, '100' c6  FROM `loottable_entries`) lt
c1 = `loottable_id`
...
c6 = `probability`


You'll need to adjust the c3 through c6 values in the third line to whatever you want the 'default' to be.


EDIT: If you have already made any entries with that item id, the script will probably fail on duplicate key entry.

If that's the case, you can run:
Code:
DELETE FROM `loottable_entries` WHERE `lootdrop_id` = '165862'
to clear out any existing entries.
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 02-06-2016 at 08:01 PM..
Reply With Quote