2012-11-23 39 views
0

我必須將Xoops項目轉換爲Wordpress。 現在我遇到了將Xoops註釋轉換爲Wordpress的問題。 我已經知道存儲註釋的表是「xoopscomments」表,但我不知道它的字段的含義,我搜索了很多,並沒有發現任何關於它的信息。 關於「XoopsComment」類。將xoops註釋轉換爲Wordpress

有人知道嗎? 下面是表的架構:

CREATE TABLE `xoops_xoopscomments` (
    `com_id` mediumint(8) unsigned NOT NULL auto_increment, 
    `com_pid` mediumint(8) unsigned NOT NULL default '0', 
    `com_rootid` mediumint(8) unsigned NOT NULL default '0', 
    `com_modid` smallint(5) unsigned NOT NULL default '0', 
    `com_itemid` mediumint(8) unsigned NOT NULL default '0', 
    `com_icon` varchar(25) collate latin1_general_ci NOT NULL default '', 
    `com_created` int(10) unsigned NOT NULL default '0', 
    `com_modified` int(10) unsigned NOT NULL default '0', 
    `com_uid` mediumint(8) unsigned NOT NULL default '0', 
    `com_ip` varchar(15) collate latin1_general_ci NOT NULL default '', 
    `com_title` varchar(255) collate latin1_general_ci NOT NULL default '', 
    `com_text` text collate latin1_general_ci, 
    `com_sig` tinyint(1) unsigned NOT NULL default '0', 
    `com_status` tinyint(1) unsigned NOT NULL default '0', 
    `com_exparams` varchar(255) collate latin1_general_ci NOT NULL default '', 
    `dohtml` tinyint(1) unsigned NOT NULL default '0', 
    `dosmiley` tinyint(1) unsigned NOT NULL default '0', 
    `doxcode` tinyint(1) unsigned NOT NULL default '0', 
    `doimage` tinyint(1) unsigned NOT NULL default '0', 
    `dobr` tinyint(1) unsigned NOT NULL default '0', 
    PRIMARY KEY (`com_id`), 
    KEY `com_pid` (`com_pid`), 
    KEY `com_itemid` (`com_itemid`), 
    KEY `com_uid` (`com_uid`), 
    KEY `com_title` (`com_title`(40)) 
) ENGINE=MyISAM AUTO_INCREMENT=19443 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; 

提前感謝! ;)

回答

1

你只需要這些字段:

  1. com_itemid(帖子ID)
  2. com_uid(用戶ID)
  3. com_text(註釋文本)
  4. com_status(狀態)
  5. com_created (日期)

然後獲取用戶信息(unameemail)通過com_uidusers表比插入所有數據到WordPress wp_comments表:

  • comment_post_ID
  • COMMENT_AUTHOR(用戶名)
  • comment_author_email
  • COMMENT_CONTENT
  • comment_approved
  • COMMENT_DATE
+0

據我記得我使用了一些查詢,就像你說的。 ;) –