1. 程式人生 > >DEDECMS中直接通過資料庫插入文章 【sql語句】

DEDECMS中直接通過資料庫插入文章 【sql語句】

突然想用爬蟲爬來的資料對接DEDECMS,所以研究了一下怎麼直接在DEDECMS中直接插入一篇文章,其中各個欄位的意思,各位自己百度查下吧。

(但其實我並沒有這樣用。因為我直接用前臺做的網頁,用ajax請求的json資料,其他的都簡單,就是沒辦法人工稽核內容)嘗試了半天,其實只要操作下面三個表格即可。希望好品牌的分享能幫到你


INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (3, 2, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (4, 3, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (5, 3, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (6, 3, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (7, 4, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (8, 4, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);
INSERT INTO `dede_addonarticle` (`aid`, `typeid`, `body`, `redirecturl`, `templet`, `userip`) VALUES (9, 4, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, ‘‘, ‘127.0.0.1‘);

INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(3, 2, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(4, 3, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(5, 3, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(6, 3, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(7, 4, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(8, 4, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);
INSERT INTO `dede_archives` (`id`, `typeid`, `typeid2`, `sortrank`, `flag`, `ismake`, `channel`, `arcrank`, `click`, `money`, `title`, `shorttitle`, `color`, `writer`, `source`, `litpic`, `pubdate`, `senddate`, `mid`, `keywords`, `lastpost`, `scores`, `goodpost`, `badpost`, `voteid`, `notpost`, `description`, `filename`, `dutyadmin`, `tackid`, `mtype`, `weight`) VALUES(9, 4, ‘0‘, 1428895820, ‘‘, 1, 1, 0, 177, 0, ‘文章15‘, ‘‘, ‘‘, ‘admin‘, ‘未知‘, ‘‘, 1428895820, 1428895835, 1, ‘文章,我是,文章,‘, 0, 0, 0, 0, 0, 0, ‘<object data="http://dlstatic.cdn.zhanqi.tv/assets/swf/chunk/v2/BFPlayer.swf‘, ‘‘, 1, 0, 0, 7);

INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (3, 2, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (4, 3, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (5, 3, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (6, 3, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (7, 4, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (8, 4, ‘0‘, 0, 1, 1428897598, 1428897570, 1);
INSERT INTO `dede_arctiny` (`id`, `typeid`, `typeid2`, `arcrank`, `channel`, `senddate`, `sortrank`, `mid`) VALUES (9, 4, ‘0‘, 0, 1, 1428897598, 1428897570, 1);