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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-09-2012, 03:51 AM
ProSkeptic
Fire Beetle
 
Join Date: Feb 2012
Location: New York and Charlotte
Posts: 17
Default Teensy modification

The problem was that MySQL is using that primary key as the replace logic marker... without that it's doing an insert with an primary keys, so it's giving it zero for the ID -- over and over and over again. So, all your records were going in, as ID 0, each rewriting the previous one (kinda cruel).

Here is the fix, and it's simple.

Add the ID to the REPLACE clause and the SELECT clause-- as :

REPLACE INTO
`spells_new`(
`id`,
`player_1`,
`teleport_zone`,
`you_cast`,
`other_casts`,
...
SELECT
`spells_old`.`id`,
`spells_old`.`player_1`,
`spells_old`.`teleport_zone`,
`spells_old`.`you_cast`,
`spells_old`.`other_casts`,
...
FROM
`spells_old`,
`spells_new`
WHERE
`spells_old`.`name` = `spells_new`.`name` AND
`spells_old`.`classes2` <= 60;

but DO NOT add the ID column as a criterion to the WHERE clause at the bottom. You could add it, but it's not needed.
Reply With Quote
 

Thread Tools
Display Modes

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 10:47 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3