Postby Leodagan » Thu Feb 06, 2014 4:33 pm
The logic for this script is a bit weird...
It creates a temp table with all "unique" mob record.
Then it inserts ONE of all "duplicate" mob records into the temp table.
After that it lists all mobs in the temp table appended to the current mob table, and the records only appearing "once" will be the "deleted" records, sent to the backup table.
It's way simpler to make a temp table with a UNIQUE constraint (Name, X, Y, Z, Region), then INSERT IGNORE, or REPLACE INTO the whole mob table, finally LEFT JOIN, on mob_id, the mob table to the temp table and select only record where the join result in "NULL" this will give the "deleted" records...