• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC mysql error HELP sql

pablobion

Member
Joined
Aug 31, 2016
Messages
39
Solutions
1
Reaction score
5
I'm having this error on the console, I changed the database recently, can anyone help me? :(
Console Otx2 (7.72) <<

[21/9/2018 15:55:37] Error while saving player: Lady Drew.

[21/9/2018 15:55:36] mysql_real_query(): SELECT `pid`, `sid`, `itemtype`, `count`, `attributes`, `serial` FROM `player_depotitems` WHERE `player_id` = 51 ORDER BY `sid` DESC - MYSQL ERROR: Unknown column 'serial' in 'field list' (1054)

[21/9/2018 15:55:42] mysql_real_query(): INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`, `serial`) VALUES (51,3,101,1987,1,'','NCFLI-U2B8Z-IO2RK-YQVGK'),(51,4,102,2651,1,'','2NS3P-G3G5W-USZT1-OR48F'),(51,5,103,2050,1,'','1OLV9-7UBOK-IH540-2LHT2'),(51,6,104,2382,1,'','RRZOX-7JOH4-KXFS7-MIVVB'),(51,101,105,2674,1,'','29PM0-XIR8D-NEGXE-YUBR0') - MYSQL ERROR: Unknown column 'serial' in 'field list' (1054)
 
Solution
_______________________________

SOLVED!

Delete table player_items and player_depotitems

and

Add querys

CREATE TABLE `player_items`
(
`player_id` INT NOT NULL,
`pid` INT NOT NULL DEFAULT 0,
`sid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL DEFAULT 0,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
`serial` VARCHAR(255) NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `sid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;



CREATE TABLE `player_depotitems`
(
`player_id` INT NOT NULL,
`sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
`pid`...
_______________________________

SOLVED!

Delete table player_items and player_depotitems

and

Add querys

CREATE TABLE `player_items`
(
`player_id` INT NOT NULL,
`pid` INT NOT NULL DEFAULT 0,
`sid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL DEFAULT 0,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
`serial` VARCHAR(255) NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `sid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;



CREATE TABLE `player_depotitems`
(
`player_id` INT NOT NULL,
`sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
`serial` VARCHAR(255) NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `sid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
 
Solution
Back
Top