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

modern acc forum dosent work?

Apras

New Member
Joined
Mar 13, 2010
Messages
16
Reaction score
0
Location
Iceland (Poland)
Hey how come modern acc forum dosent work?
i get this error:

A Database Error Occurred

Error Number: 1054

Unknown column 'thread_id' in 'field list'

SELECT `b`.`id`, `b`.`name`, `b`.`description`, `b`.`closed`, `b`.`moderators`, `u`.`name` AS `author`, `p`.`thread_id`, `t`.`name` AS `thread_title`, `p`.`time` FROM `forums` AS `b` LEFT JOIN (SELECT `time`, `thread_id`, `board_id`, `author` FROM `posts` ORDER BY `time` DESC) AS `p` ON `p`.`board_id` = `b`.`id` LEFT JOIN `players` AS `u` ON `u`.`id` = `p`.`author` LEFT JOIN `threads` AS `t` ON `t`.`id` = `p`.`thread_id` WHERE `b`.`access` <= '5' AND (`b`.`guild` IS NULL OR `b`.`guild` IN (SELECT `guild_id` FROM guild_ranks WHERE `id` IN (SELECT rank_id FROM players WHERE account_id = '1'))) GROUP BY `b`.`id` ORDER BY `b`.`order` ASC;
 
CREATE TABLE IF NOT EXISTS `forums` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(120),
`description` tinytext,
`access` smallint(5) DEFAULT '1' COMMENT 'Min. access to see the board',
`closed` tinyint(1),
`moderators` tinytext,
`order` int(6),
`requireLogin` tinyint(1),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

ALTER TABLE `forums` ADD `guild` int(11);

CREATE TABLE IF NOT EXISTS `threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(120),
`sticked` tinyint(1),
`closed` tinyint(1),
`author` varchar(64),
`time` int(11),
`board_id` int(11),
PRIMARY KEY (`id`),
FOREIGN KEY (`board_id`) REFERENCES `forums` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(120) ,
`text` text,
`time` int(11),
`author` varchar(64),
`board_id` int(11),
`thread_id` int(11),
PRIMARY KEY (`id`),
FOREIGN KEY (`board_id`) REFERENCES `forums` (`id`) ON DELETE CASCADE,
FOREIGN KEY (`thread_id`) REFERENCES `threads` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
does not work ;s..

Error :

A Database Error Occurred

Error Number: 1054

Unknown column 'thread_id' in 'field list'

SELECT `b`.`id`, `b`.`name`, `b`.`description`, `b`.`closed`, `b`.`moderators`, `u`.`name` AS `author`, `p`.`thread_id`, `t`.`name` AS `thread_title`, `p`.`time` FROM `forums` AS `b` LEFT JOIN (SELECT `time`, `thread_id`, `board_id`, `author` FROM `posts` ORDER BY `time` DESC) AS `p` ON `p`.`board_id` = `b`.`id` LEFT JOIN `players` AS `u` ON `u`.`id` = `p`.`author` LEFT JOIN `threads` AS `t` ON `t`.`id` = `p`.`thread_id` WHERE `b`.`access` <= '0' AND `requireLogin` != '1' AND `b`.`guild` IS NULL GROUP BY `b`.`id` ORDER BY `b`.`order` ASC;
 
Back
Top