SQL直接批量插入文章数据到数据库,文章无法访问
我看新增文章后,数据库中就是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);