• 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!

Solved [SQL] Errors in console on logout

sharpy

New Member
Joined
Jan 4, 2010
Messages
77
Reaction score
0
I am getting these errors whenever anyone logs out of my server,
I know what they are from but i don't know how to create the missing tables in my database.

does anyone have the sql queries on how to add these tables in TFS 0.3.6?

its for bans and depot items

Code:
[11/07/2013 17:20:41] mysql_real_query(): SELECT `id`, `value`, `param`, `expires` FROM `bans` WHERE `type` = 1 AND `active` = 1 - MYSQL ERROR: Table 'ksdunlapotserv.bans' doesn't exist (1146)
[11/07/2013 17:20:41] mysql_real_query(): SELECT * FROM `bans` WHERE `value` = 2 AND `type` = 3 AND `active` = 1 AND (`expires` > 1373581241 OR `expires` <= 0) LIMIT 1 - MYSQL ERROR: Table 'ksdunlapotserv.bans' doesn't exist (1146)
[11/07/2013 17:20:41] mysql_real_query(): SELECT * FROM `bans` WHERE `value` = 268463359 AND `param` = 3 AND `type` = 2 AND `active` = 1 AND (`expires` > 1373581241 OR `expires` <= 0) LIMIT 1 - MYSQL ERROR: Table 'ksdunlapotserv.bans' doesn't exist (1146)
[11/07/2013 17:20:41] mysql_real_query(): SELECT `id` FROM `bans` WHERE `type` = 2 AND `value` = 2 AND `param` = 2 AND `active` = 1 LIMIT 1 - MYSQL ERROR: Table 'ksdunlapotserv.bans' doesn't exist (1146)
[11/07/2013 17:20:41] mysql_real_query(): SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_depotitems` WHERE `player_id` = 2 ORDER BY `sid` DESC - MYSQL ERROR: Table 'ksdunlapotserv.player_depotitems' doesn't exist (1146)
 
Last edited:
SQL:
CREATE TABLE `bans`
(
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
    `type` TINYINT(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion',
    `value` INT UNSIGNED NOT NULL COMMENT 'ip address (integer), player guid or account number',
    `param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'used only for ip banishment mask (integer)',
    `active` TINYINT(1) NOT NULL DEFAULT TRUE,
    `expires` INT NOT NULL,
    `added` INT UNSIGNED NOT NULL,
    `admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
    `comment` TEXT NOT NULL,
    `reason` INT UNSIGNED NOT NULL DEFAULT 0,
    `action` INT UNSIGNED NOT NULL DEFAULT 0,
    `statement` VARCHAR(255) NOT NULL DEFAULT '',
    PRIMARY KEY (`id`),
    KEY `type` (`type`, `value`),
    KEY `active` (`active`)
) ENGINE = InnoDB;

SQL:
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,
    KEY (`player_id`), UNIQUE (`player_id`, `sid`),
    FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

Taken directly from Subversion
 
Thank you! I didn't even know that page existed :$

rep++ (well as soon as i can give it to you again lol)

*edit error moved to another thread
 
Last edited:
Back
Top