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-10-17)
修复百度编辑器里的内容图片没有转换为webp格式 历史文章列表不显...
站群分站系统
站群分站系统(2026-10-15)
子站域名新增llms.txt访问
图书阅读系统
图书阅读系统(2026-10-14)
全站移动端样式适配 首页分类 Tab 横滑容器,左右渐变滚动提示 ...
GEO系统
GEO系统(2026-10-14)
修复下载zip空白地址问题 修复流量复刻和任务队列错误
GeoSeo收录宝
GeoSeo收录宝(2026-10-14)
新增 站长工具箱 前端首页自动调用meta 数据
滑块验证码 Gocaptcha
滑块验证码 Gocaptcha(2026-10-13)
基于开源项目 go-captcha 的行为验证码插件,滑动拼图、区域...
GeoSeo工具箱
GeoSeo工具箱(2026-10-13)
优化巡检任务
GeoSeo排名助手
GeoSeo排名助手(2026-10-11)
加入大模型自定义
SEO聚合关键字
SEO聚合关键字(2026-10-11)
优化关键字列表页最多支持1万篇文章,过多会导致服务器扛不住;