找回密码
 免费注册

使用SQL命令手动写入Discuz帖子内容

[复制链接]
admin 发表于 2020-9-15 13:02:06 | 显示全部楼层 |阅读模式
-- 转存表中的数据`forum_post`
INSERT INTO `forum_post` (`pid`, `fid`,`tid`, `first`, `author`, `authorid`, `subject`, `dateline`, `message`,`useip`, `invisible`, `anonymous`, `usesig`, `htmlon`, `bbcodeoff`,`smileyoff`, `parseurloff`, `attachment`, `rate`, `ratetimes`, `status`,`tags`, `comment`, `replycredit`) VALUES
(5, 36, 4, 1, 'admin', 1, '这又是一条帖子',1311173433, '这当然是内容啦\r\n从前....结束\r\n', '127.0.0.1', 0, 0, 1, 0, -1, -1, 0, 0, 0, 0, 0, '', 0, 0);
-- 转存表中的数据`forum_thread`
INSERT INTO `forum_thread` (`tid`,`fid`, `posttableid`, `typeid`, `sortid`, `readperm`, `price`, `author`,`authorid`, `subject`, `dateline`, `lastpost`, `lastposter`, `views`,`replies`, `displayorder`, `highlight`, `digest`, `rate`, `special`,`attachment`, `moderated`, `closed`, `stickreply`, `recommends`,`recommend_add`, `recommend_sub`, `heats`, `status`, `isgroup`, `favtimes`,`sharetimes`, `stamp`, `icon`, `pushedaid`, `cover`, `replycredit`) VALUES
(5, 36, 0, 0, 0, 0, 0, 'admin', 1, '这又是一条帖子',1311173433, 1311173433, 'admin', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32, 0, 0, 0, -1, -1, 0, 0, 0);
-- 转存表中的数据`forum_post_tableid`
INSERT INTO `forum_post_tableid`(`pid`) VALUES (5);
-- 更新 forum_forum 表
UPDATE `forum_forum` SET threads=threads+1, posts=posts+1, lastpost='5   这又是一条帖子   1311173433  admin' WHERE fid='36';
-- 首先要查找一下forum_post (forum_post_tableid 和他的pid是一样的) 的 pid最大值 、 forum_thread 的 tid 最大值 ,由查出来的起始id+1 作为新的id。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|Archiver|手机版|小黑屋|信息共享网

GMT+8, 2024-5-14 05:13 , Processed in 0.069062 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表