Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2016, 03:46 PM
Warking
Hill Giant
 
Join Date: Mar 2012
Location: Norrath
Posts: 132
Default lootdrop mass update

I would like to add lootdrop id 165862 to Every single loottable in the database.

I am having issues with the sql update for this as I would have to add rows for every loottableID in the loottable_entries table.
Reply With Quote
  #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
  #3  
Old 02-06-2016, 08:01 PM
Warking
Hill Giant
 
Join Date: Mar 2012
Location: Norrath
Posts: 132
Default

Getting a response with
Code:
ERROR 1062 (23000) at line 1 in file: 'Z:\EQProject\A1 - MAss DB Update Strings\
new.sql': Duplicate entry '81-165862' for key 'PRIMARY'
Reply With Quote
  #4  
Old 02-06-2016, 08:07 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I didn't get my edit in fast enough :P
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #5  
Old 02-06-2016, 09:48 PM
Warking
Hill Giant
 
Join Date: Mar 2012
Location: Norrath
Posts: 132
Default

lol thanks. yep had to remove existing entries
Reply With Quote
  #6  
Old 02-06-2016, 09:49 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Lol! Always 2 seconds too late!

Np
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:40 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3