业务经理

微信扫描以上二维码

028-61286886

技术咨询

SQL直接批量插入文章数据到数据库,文章无法访问

迅睿框架 更新 2026-09-03 10:33:40 1234

我看新增文章后,数据库中就是dr_1_news_index 表,dr_1_news_data_0 表,dr_1_news 表,这3个表新增了数据,于是想用SQL直接批量增加数据(等于是批量发布文章),具体SQL命令在下面,插入数据后,后台列表有文章,也可点击修改进入文章编辑页面,但是url无法访问,这个应该怎么解决?

1. 插入 dr_1_news_index 表
INSERT INTO dr_1_news_index (id, uid, catid, status, inputtime) VALUES
(2, 1, 17, 9, 1788397381),
(3, 1, 17, 9, 1788397381),
(4, 1, 17, 9, 1788397381),
(5, 1, 17, 9, 1788397381),
(6, 1, 17, 9, 1788397381),
(7, 1, 17, 9, 1788397381),
(8, 1, 17, 9, 1788397381),
(9, 1, 17, 9, 1788397381),
(10, 1, 17, 9, 1788397381),
(11, 1, 17, 9, 1788397381),
(12, 1, 17, 9, 1788397381),
(13, 1, 17, 9, 1788397381),
(14, 1, 17, 9, 1788397381),
(15, 1, 17, 9, 1788397381),
(16, 1, 17, 9, 1788397381),
(17, 1, 17, 9, 1788397381);

2. 插入 dr_1_news_data_0 表
INSERT INTO dr_1_news_data_0 (id, uid, catid, content) VALUES
(2, 1, 17, '<p><img src="/uploadfile/products/17/1.jpg" /></p>'),
(3, 1, 17, '<p><img src="/uploadfile/products/17/2.jpg" /></p>'),
(4, 1, 17, '<p><img src="/uploadfile/products/17/3.jpg" /></p>'),
(5, 1, 17, '<p><img src="/uploadfile/products/17/4.jpg" /></p>'),
(6, 1, 17, '<p><img src="/uploadfile/products/17/5.jpg" /></p>'),
(7, 1, 17, '<p><img src="/uploadfile/products/17/6.jpg" /></p>'),
(8, 1, 17, '<p><img src="/uploadfile/products/17/7.jpg" /></p>'),
(9, 1, 17, '<p><img src="/uploadfile/products/17/8.jpg" /></p>'),
(10, 1, 17, '<p><img src="/uploadfile/products/17/9.jpg" /></p>'),
(11, 1, 17, '<p><img src="/uploadfile/products/17/10.jpg" /></p>'),
(12, 1, 17, '<p><img src="/uploadfile/products/17/11.jpg" /></p>'),
(13, 1, 17, '<p><img src="/uploadfile/products/17/12.jpg" /></p>'),
(14, 1, 17, '<p><img src="/uploadfile/products/17/13.jpg" /></p>'),
(15, 1, 17, '<p><img src="/uploadfile/products/17/14.jpg" /></p>'),
(16, 1, 17, '<p><img src="/uploadfile/products/17/15.jpg" /></p>'),
(17, 1, 17, '<p><img src="/uploadfile/products/17/16.jpg" /></p>');

3. 插入 dr_1_news 表
INSERT INTO dr_1_news (id, catid, title, thumb, keywords, description, hits, uid, author, status, url, link_id, tableid, inputip, inputtime, updatetime, displayorder) VALUES
(2, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=2', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(3, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=3', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(4, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=4', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(5, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=5', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(6, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=6', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(7, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=7', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(8, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=8', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(9, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=9', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(10, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=10', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(11, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=11', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(12, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=12', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(13, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=13', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(14, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=14', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(15, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=15', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(16, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=16', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0),
(17, 17, '电力标牌', '', '', '', 1, 1, '创始人', 9, '/index.php?c=show&id=17', 0, 0, '36.7.135.88-63919', 1788397381, 1788397381, 0);

方案

  • 社区管理员 #1 · 2026-09-03 10:15:26
    满意答案
    还少一个dr_1_share_index
  • 1234 #2 · 2026-09-03 10:33:40
    @社区管理员:感谢,已经完美解决问题

迅睿系统漏洞

阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...
下载Plus
下载Plus(2026-09-09)
为网站附件下载加上“计数、限次、统计、防护”四重能力:按用户组控制下...
全库搜索
全库搜索(2026-09-09)
修复全模块搜索时,删除按钮点击无效的bug
在线客服
在线客服(2026-09-09)
增加消息提示音
GeoSeo工具箱
GeoSeo工具箱(2026-09-08)
修正字段报错 优化蜘蛛配置页
GeoSeo收录宝
GeoSeo收录宝(2026-09-08)
新增 多网站系统Sites 开关 新增 SITE_ID字段,完美...
站群分站系统
站群分站系统(2026-09-08)
后台加入模板标签的语法代码供复制 当站点logo未上传时,调用系统...
开发者工具
开发者工具(2026-09-08)
增加联动菜单数据导出引导
在线浮动客服
在线浮动客服(2026-09-07)
移除对jquery的依赖 优化后端配置界面UI