copy thread

DROP TABLE IF EXISTS `fcsapxmy_forum4hk`.`mybb_threads`;

CREATE TABLE `fcsapxmy_forum4hk`.`mybb_threads` (

  `tid` int UNSIGNED NOT NULL,

  `fid` smallint UNSIGNED NOT NULL DEFAULT '0',

  `subject` varchar(120) NOT NULL DEFAULT '',

  `prefix` smallint UNSIGNED NOT NULL DEFAULT '0',

  `icon` smallint UNSIGNED NOT NULL DEFAULT '0',

  `poll` int UNSIGNED NOT NULL DEFAULT '0',

  `uid` int UNSIGNED NOT NULL DEFAULT '0',

  `username` varchar(80) NOT NULL DEFAULT '',

  `dateline` int UNSIGNED NOT NULL DEFAULT '0',

  `firstpost` int UNSIGNED NOT NULL DEFAULT '0',

  `lastpost` int UNSIGNED NOT NULL DEFAULT '0',

  `lastposter` varchar(120) NOT NULL DEFAULT '',

  `lastposteruid` int UNSIGNED NOT NULL DEFAULT '0',

  `views` int UNSIGNED NOT NULL DEFAULT '0',

  `replies` int UNSIGNED NOT NULL DEFAULT '0',

  `closed` varchar(30) NOT NULL DEFAULT '',

  `sticky` tinyint(1) NOT NULL DEFAULT '0',

  `numratings` smallint UNSIGNED NOT NULL DEFAULT '0',

  `totalratings` smallint UNSIGNED NOT NULL DEFAULT '0',

  `notes` text NOT NULL,

  `visible` tinyint(1) NOT NULL DEFAULT '0',

  `unapprovedposts` int UNSIGNED NOT NULL DEFAULT '0',

  `deletedposts` int UNSIGNED NOT NULL DEFAULT '0',

  `attachmentcount` int UNSIGNED NOT NULL DEFAULT '0',

  `deletetime` int UNSIGNED NOT NULL DEFAULT '0'

) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

ALTER TABLE `fcsapxmy_forum4hk`.`mybb_threads` ADD PRIMARY KEY (`tid`), ADD KEY `fid` (`fid`,`visible`,`sticky`), ADD KEY `dateline` (`dateline`), ADD KEY `lastpost` (`lastpost`,`fid`), ADD KEY `firstpost` (`firstpost`), ADD KEY `uid` (`uid`);ALTER TABLE `fcsapxmy_forum4hk`.`mybb_threads` ADD FULLTEXT KEY `subject` (`subject`);

ALTER TABLE `fcsapxmy_forum4hk`.`mybb_threads` MODIFY `tid` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14626856;


SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';


INSERT INTO `fcsapxmy_forum4hk`.`mybb_threads`(`tid`, `fid`, `subject`, `prefix`, `icon`, `poll`, `uid`, `username`, `dateline`, `firstpost`, `lastpost`, `lastposter`, `lastposteruid`, `views`, `replies`, `closed`, `sticky`, `numratings`, `totalratings`, `notes`, `visible`, `unapprovedposts`, `deletedposts`, `attachmentcount`, `deletetime`) SELECT `tid`, `fid`, `subject`, `prefix`, `icon`, `poll`, `uid`, `username`, `dateline`, `firstpost`, `lastpost`, `lastposter`, `lastposteruid`, `views`, `replies`, `closed`, `sticky`, `numratings`, `totalratings`, `notes`, `visible`, `unapprovedposts`, `deletedposts`, `attachmentcount`, `deletetime` FROM `fcsapxmy_close`.`mybb_threads`;

Comments

Popular posts from this blog

Drop Table

Copy Post to forum