• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Forgottenserver.news

Lingon

New Member
Joined
Nov 8, 2011
Messages
32
Reaction score
0
I get this error with latest modern aac..

A Database Error Occurred
Error Number: 1146

Table 'forgottenserver.news' doesn't exist

SELECT * FROM (`news`) ORDER BY `id` desc LIMIT 10



How to add this table in phpmyadmin?
 
Code:
ALTER TABLE `accounts` ADD `page_access` int(11);

ALTER TABLE `accounts` ADD `page_lastday` int(11);

ALTER TABLE `accounts` ADD `email_new` varchar(255);

ALTER TABLE `accounts` ADD `email_new_time` int(15);

ALTER TABLE `accounts` ADD `rlname` varchar(255);

ALTER TABLE `accounts` ADD `location` varchar(255);

ALTER TABLE `accounts` ADD `created` int(16);

ALTER TABLE `accounts` ADD `email_code` varchar(255);

ALTER TABLE `accounts` ADD `next_email` int(11);

ALTER TABLE `accounts` ADD `premium_points` int(11);

ALTER TABLE `players` ADD `old_name` varchar(255);

ALTER TABLE `players` ADD `hide_char` int(11);

ALTER TABLE `players` ADD `worldtransfer` int(11);

ALTER TABLE `players` ADD `created` int(16);

ALTER TABLE `players` ADD `nick_verify` int(11);

ALTER TABLE `players` ADD `comment` text;



CREATE TABLE IF NOT EXISTS `news` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL DEFAULT '',

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `comments` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `news_id` int(11) DEFAULT NULL,

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  `author` varchar(64) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;



CREATE TABLE IF NOT EXISTS `forums` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `name` varchar(64) NOT NULL,

  `description` text NOT NULL,

  `access` int(5) unsigned NOT NULL,

  `closed` int(1) unsigned NOT NULL COMMENT 'Min. access to see the board',

  `moderators` text NOT NULL,

  `order` int(6) DEFAULT NULL,

  `requireLogin` int(1) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `posts` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL,

  `text` text NOT NULL,

  `time` int(16) unsigned NOT NULL,

  `author` varchar(64) NOT NULL,

  `board_id` int(16) unsigned NOT NULL,

  `thread_id` int(16) unsigned NOT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `threads` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `name` varchar(64) NOT NULL,

  `sticked` tinyint(1) unsigned NOT NULL,

  `closed` tinyint(1) unsigned NOT NULL,

  `author` varchar(64) NOT NULL,

  `time` int(12) unsigned NOT NULL,

  `board_id` int(12) unsigned NOT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `bugtracker` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `category` int(3) unsigned NOT NULL,

  `time` int(16) unsigned NOT NULL,

  `author` int(16) unsigned NOT NULL,

  `text` text NOT NULL,

  `title` varchar(64) NOT NULL,

  `done` int(3) unsigned NOT NULL,

  `priority` int(3) unsigned NOT NULL,

  `closed` int(1) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
rep++

if only for news
Code:
CREATE TABLE IF NOT EXISTS `news` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL DEFAULT '',

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
Thanks, but now...

A Database Error Occurred
Error Number: 1146

Table 'forgottenserver.poll' doesn't exist

SELECT p.id, p.question, GROUP_CONCAT(a.answer SEPARATOR ';') AS answers, GROUP_CONCAT(a.id SEPARATOR ';') AS answers_id FROM poll p JOIN poll_answer a ON p.id = a.poll_id WHERE p.status = 1 AND date_start <= NOW() AND date_end >= NOW()
 
Code:
CREATE TABLE IF NOT EXISTS `poll` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `question` VARCHAR(150) ,
  `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `date_start` datetime ,
  `date_end` datetime ,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `question` (`question`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Code:
CREATE TABLE IF NOT EXISTS `poll_answer` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `poll_id` INT(11) NOT NULL,
  `answer` VARCHAR(150) ,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Code:
CREATE TABLE IF NOT EXISTS `poll_votes` (`id` INT(11) NOT NULL AUTO_INCREMENT,`answer_id` INT(11) ,`poll_id` INT(11) ,`account_id` INT(11) NOT NULL,PRIMARY KEY (`id`),FOREIGN KEY (`answer_id`) REFERENCES `poll_answer` (`id`) ON DELETE CASCADE,FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE,FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
Code:
ALTER TABLE `accounts` ADD `page_access` int(11);

ALTER TABLE `accounts` ADD `page_lastday` int(11);

ALTER TABLE `accounts` ADD `email_new` varchar(255);

ALTER TABLE `accounts` ADD `email_new_time` int(15);

ALTER TABLE `accounts` ADD `rlname` varchar(255);

ALTER TABLE `accounts` ADD `location` varchar(255);

ALTER TABLE `accounts` ADD `created` int(16);

ALTER TABLE `accounts` ADD `email_code` varchar(255);

ALTER TABLE `accounts` ADD `next_email` int(11);

ALTER TABLE `accounts` ADD `premium_points` int(11);

ALTER TABLE `players` ADD `old_name` varchar(255);

ALTER TABLE `players` ADD `hide_char` int(11);

ALTER TABLE `players` ADD `worldtransfer` int(11);

ALTER TABLE `players` ADD `created` int(16);

ALTER TABLE `players` ADD `nick_verify` int(11);

ALTER TABLE `players` ADD `comment` text;



CREATE TABLE IF NOT EXISTS `news` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL DEFAULT '',

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `comments` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `news_id` int(11) DEFAULT NULL,

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  `author` varchar(64) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;



CREATE TABLE IF NOT EXISTS `forums` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `name` varchar(64) NOT NULL,

  `description` text NOT NULL,

  `access` int(5) unsigned NOT NULL,

  `closed` int(1) unsigned NOT NULL COMMENT 'Min. access to see the board',

  `moderators` text NOT NULL,

  `order` int(6) DEFAULT NULL,

  `requireLogin` int(1) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `posts` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL,

  `text` text NOT NULL,

  `time` int(16) unsigned NOT NULL,

  `author` varchar(64) NOT NULL,

  `board_id` int(16) unsigned NOT NULL,

  `thread_id` int(16) unsigned NOT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `threads` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `name` varchar(64) NOT NULL,

  `sticked` tinyint(1) unsigned NOT NULL,

  `closed` tinyint(1) unsigned NOT NULL,

  `author` varchar(64) NOT NULL,

  `time` int(12) unsigned NOT NULL,

  `board_id` int(12) unsigned NOT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



CREATE TABLE IF NOT EXISTS `bugtracker` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `category` int(3) unsigned NOT NULL,

  `time` int(16) unsigned NOT NULL,

  `author` int(16) unsigned NOT NULL,

  `text` text NOT NULL,

  `title` varchar(64) NOT NULL,

  `done` int(3) unsigned NOT NULL,

  `priority` int(3) unsigned NOT NULL,

  `closed` int(1) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
rep++

if only for news
Code:
CREATE TABLE IF NOT EXISTS `news` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `title` varchar(64) NOT NULL DEFAULT '',

  `body` text NOT NULL,

  `time` int(18) NOT NULL DEFAULT '0',

  PRIMARY KEY (`id`)

) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

I have this news problem. Where should i put in the code? :o I'm new at this with the websites and trying to learn. :)
So if you just tell me where i should put the code i will be so glad :D
 
SQL:
 CREATE TABLE `server_motd` ( `id` INT UNSIGNED NOT NULL, `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0, `text` TEXT NOT NULL, UNIQUE (`id`, `world_id`) ) ENGINE = InnoDB;

INSERT INTO `server_motd` VALUES (1, 0, 'Welcome to The Forgotten Server!');
 
Back
Top