· 8 years ago · May 29, 2018, 10:18 AM
1CREATE TABLE if not exists `tmp_PlayerAchievements` (
2 `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
3 `playerId` int(10) unsigned NOT NULL DEFAULT '0',
4 `staticId` int(10) unsigned NOT NULL DEFAULT '0',
5 `type` int(10) unsigned NOT NULL DEFAULT '0',
6 `entryTime` datetime DEFAULT NULL,
7 `tier` int(10) unsigned DEFAULT '0',
8 `count` int(10) DEFAULT '0',
9 `statusMask` int(10) unsigned DEFAULT '0'
10 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
11
12INSERT INTO tmp_PlayerAchievements(playerId, staticId, type, entryTime, tier, count, statusMask)
13 SELECT playerId, staticId, type, entryTime, tier, count, statusMask
14 FROM PlayerAchievements
15 WHERE (count != 0 or type != 4);