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

RevScripts Mysql login history table

Guralztr

Premium User
Premium User
Joined
Dec 4, 2010
Messages
68
Reaction score
5
Hello, can someone gives lines for sql?

[11:29:16.831] mysql_real_query(): DELETE FROM login_history WHERE date < 1707650956 - MYSQL ERROR: Table 'ots.login_history' doesn't exist (1146)
 
Code:
CREATE TABLE IF NOT EXISTS `login_history`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`account_id` INT(11) NOT NULL DEFAULT 0,
`player_id` INT(11) NOT NULL DEFAULT 0,
`where` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - server, 2 - website',
`type` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - login, 2 - logout',
`ip` VARCHAR(45) NOT NULL DEFAULT '',
`date` INT(11) NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`)
) ENGINE = InnoDB;

Delete the table and execute this.
 
Code:
CREATE TABLE IF NOT EXISTS `login_history`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`account_id` INT(11) NOT NULL DEFAULT 0,
`player_id` INT(11) NOT NULL DEFAULT 0,
`where` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - server, 2 - website',
`type` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - login, 2 - logout',
`ip` VARCHAR(45) NOT NULL DEFAULT '',
`date` INT(11) NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`)
) ENGINE = InnoDB;

Delete the table and execute this.
Table added but still error
mysql_real_query(): INSERT INTO login_history (account_id, player_id, type, login, ip, date) VALUES (7, 15, 1, 1, 1, 1) - MYSQL ERROR: Table 'ots.login_history' doesn't exist (1146)
 
because you removed the table are u reading the errror you put the SQL in wrong database 'ots.login_history' doesn't exist (1146)
 
try.
SQL:
CREATE TABLE IF NOT EXISTS `login_history`
(
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `account_id` INT(11) NOT NULL DEFAULT 0,
  `player_id` INT(11) NOT NULL DEFAULT 0,
  `where` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - server, 2 - website',
  `type` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - login, 2 - logout',
  `login` TINYINT(1) NOT NULL DEFAULT 0,
  `ip` VARCHAR(45) NOT NULL DEFAULT '',
  `date` INT(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE = InnoDB;
 
Back
Top