最后版本 |
您的文本 |
第6行: |
第6行: |
| = Table Overview = | | = Table Overview = |
| This section is the overview of all the tables created during the WordPress standard installation. It is followed by specific information of what is in each table. | | This section is the overview of all the tables created during the WordPress standard installation. It is followed by specific information of what is in each table. |
|
| |
|
| |
|
| |
|
| |
| __TOC__
| |
| 下面是在标准地安装WordPress2.0.x版本时,创建的数据库表格的大纲和描述。当前,WordPress支持的唯一的数据库是[[WordPress:Glossary#MySQL|MySQL]]3.23.23版本或者更高的版本。
| |
|
| |
| 因为WordPress自身与这个数据库向联系,你作为一名终端用户,不应该太多地担忧数据库的结构。 如果你正[[WordPress:Writing a Plugin|编写一个插件]],你可能对怎样直接操作数据库,感兴趣。 WordPress提供了[[WordPress:Function_Reference/wpdb Class|wpdb Class]],使得操作数据库,这个任务变得简单。
| |
|
| |
| = 表格总览=
| |
| 这个部分是标准安装WordPress时,创建的表格的总览。 表格后面,有详细的信息,关于每个格是关于什么内容的。
| |
|
| |
|
| |
|
| |
|
| |
|
| {| width="75%" border="1" | | {| width="75%" border="1" |
第47行: |
第33行: |
| | height="55" | wp_users || The list of users is maintained in table.<tt>wp_users, which </tt>has 22 columns. || [[WordPress:Administration Panels]] >> [[WordPress:Administration_Panels#Users_-_Your_Blogging_Family|Users]] | | | height="55" | wp_users || The list of users is maintained in table.<tt>wp_users, which </tt>has 22 columns. || [[WordPress:Administration Panels]] >> [[WordPress:Administration_Panels#Users_-_Your_Blogging_Family|Users]] |
| |}<br /><br /> | | |}<br /><br /> |
|
| |
|
| |
|
| |
|
| |
|
| |
| {| width="75%" border="1"
| |
| |- valign="top"
| |
| | colspan="3" bordercolor="#FFFFFF" | <strong>WordPress 2.0 表格 (10)</strong>
| |
| |- valign="top"
| |
| | width="6%" | <strong>表格名</strong> || width="15%" | <strong>描述</strong> || width="15%" | <strong>WordPress用户界面的相关区域</strong>
| |
| |- valign="top"
| |
| | wp_categories ||可以在<tt>wp_categories</tt> 表格中找到'''文章类别''',而且有五个栏。参考 || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Manage_-_Change_your_content|管理]] >> [[WordPress:Administration_Panels#Categories|类别]]
| |
| |- valign="top"
| |
| | wp_comments || WordPress中的评论,处在在 <tt>wp_comments</tt>表格,包含有15个栏。 || 评论是读者对于文章的评价,而发表的。评论是由管理员通过 by administrator via [[WordPress:Administration Panels|管理面板]]管理的 >> [[WordPress:Administration_Panels#Manage_-_Change_your_content|Manage]] >> [[WordPress:Administration_Panels#Comments|评论]]
| |
| |- valign="top"
| |
| | wp_linkcategories || <tt>wp_linkcategories</tt> 拥有输入在WordPress[[WordPress:Links_Manager| Links_Manager]]中的'''链接''' 的相关信息。拥有13栏。|| [[WordPress:Administration Panel|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> [[WordPress:Administration_Panels#Link_Categories|链接类别]]
| |
| |- valign="top"
| |
| <tt>wp_links</tt>拥有输入在WordPress[[WordPress:Links_Manager| Links_Manager]]中的'''链接''' 的相关信息。 拥有13栏。 || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> [[WordPress:Administration_Panels#Manage_Links|管理链接]]<br /> [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> [[WordPress:Administration_Panels#Add_Link|Add Links|添加链接]]<br /> [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|Links|链接]] >> [[WordPress:Administration_Panels#Import_Links|Import Links|导入链接]]
| |
| |- valign="top"
| |
| | wp_options || The '''[[WordPress:Administration_Panels#Options_-_Configuration_Settings|选项]]'''设置在'''管理 > [[WordPress:Administration_Panels#Options_-_Configuration_Settings|选项]]''' 面板,这个面板储存在<tt>wp_options</tt>表格,拥有11栏。 || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> [[WordPress:Administration_Panels#Manage_Links|管理链接]]<br /> [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Links_-_Putting_the_Inter_in_the_Internet|链接]] >> [[WordPress:Administration_Panels#Import_Links|Import Links|导入链接]]
| |
| |- valign="top"
| |
| | wp_post2cat || Each post in the <tt>wp_posts</tt>表格中的每篇文章都与 <tt>wp_categories</tt>表格中的某个类别相联系 而且这种联系保存在 <tt>wp_post2cat</tt>表格中,这个表格有13栏。|| [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Write_-_Make_some_content|写]] >> [[WordPress:Administration_Panels#Write_Post|写文章]]<br /> [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Manage_-_Change_your_content|管理]] >> [[WordPress:Administration_Panels#Posts|文章]] >> [[WordPress:Administration_Panels#Write_Post|编辑]]
| |
| |- valign="top"
| |
| | wp_postmeta || 每篇'''文章'''都有称为 '''meta data''' 信息,而且这个信息储存在<tt>wp_postmeta</tt> 表格中,这个表格拥有14栏。 ||
| |
| |- valign="top"
| |
| | wp_posts || WordPress数据的核心是'''文章'''。文章储存在<tt>wp_posts</tt>表格中,这个表格拥有21栏。 || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Write_-_Make_some_content|写]] >> [[WordPress:Administration_Panels#Write_Post|写文章]]
| |
| |- valign="top"
| |
| | wp_usermeta || 每个'''用户''' 拥有称为the '''meta data''' 的信息,而且这个信息储存在<tt>wp_usermeta</tt>,有4栏。 ||
| |
| |- valign="top"
| |
| | height="55" | wp_users ||用户列表保存在表格中。.<tt>wp_users, </tt>有22 栏。 || [[WordPress:Administration Panels|管理面板]] >> [[WordPress:Administration_Panels#Users_-_Your_Blogging_Family|用户]]
| |
| |}<br /><br />
| |
|
| |
|
| |
|
| |
|
| =Table Details= | | =Table Details= |
第85行: |
第38行: |
|
| |
|
| ==Table: wp_categories== | | ==Table: wp_categories== |
|
| |
|
| |
|
| |
| = 表格详细信息=
| |
| 这个部分是标准安装WordPress时,每个表格中创建的特别的栏。
| |
|
| |
| ==表格: wp_categories==
| |
|
| |
|
| |
|
| |
|
| |
| {| table width="90%" border=1 | | {| table width="90%" border=1 |
| !Field!!Type!!Null!!Key!!Default!!Extra | | !Field!!Type!!Null!!Key!!Default!!Extra |
第360行: |
第302行: |
| |- | | |- |
| |display_name||varchar(250)|| || || || | | |display_name||varchar(250)|| || || || |
|
| |
|
| |
|
| |
|
| |
|
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |cat_ID||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |cat_name||varchar(55)|| || || ||
| |
| |-
| |
| |category_nicename||varchar(200)|| ||IND|| ||
| |
| |-
| |
| |category_description||longtext|| || || ||
| |
| |-
| |
| |category_parent||bigint(20)|| || ||0||FK->wp_categories.cat_ID
| |
| |-
| |
| |category_count||bigint(20)|| || ||0||
| |
| |}
| |
|
| |
| ==表格: wp_comments==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |comment_ID||bigint(20) unsigned|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |comment_post_ID||int(11)|| ||IND||0||FK->wp_posts.ID
| |
| |-
| |
| |comment_author||tinytext|| || || ||
| |
| |-
| |
| |comment_author_email||varchar(100)|| || || ||
| |
| |-
| |
| |comment_author_url||varchar(200)|| || || ||
| |
| |-
| |
| |comment_author_IP||varchar(100)|| || || ||
| |
| |-
| |
| |comment_date||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |comment_date_gmt||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |comment_content||text|| || || ||
| |
| |-
| |
| |comment_karma||int(11)|| || ||0||
| |
| |-
| |
| |comment_approved||enum('0','1','spam')|| ||IND||1||
| |
| |-
| |
| |comment_agent||varchar(255)|| || || ||
| |
| |-
| |
| |comment_type||varchar(20)|| || || ||
| |
| |-
| |
| |comment_parent||bigint(20)|| || ||0||FK->wp_comment.ID
| |
| |-
| |
| |user_id||bigint(20)|| || ||0||FK->wp_users.ID
| |
| |}
| |
|
| |
| ==表格: wp_linkcategories==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |cat_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |cat_name||tinytext|| || || ||
| |
| |-
| |
| |auto_toggle||enum('Y','N')|| || ||N||
| |
| |-
| |
| |show_images||enum('Y','N')|| || ||Y||
| |
| |-
| |
| |show_description||enum('Y','N')|| || ||N||
| |
| |-
| |
| |show_rating||enum('Y','N')|| || ||Y||
| |
| |-
| |
| |show_updated||enum('Y','N')|| || ||Y||
| |
| |-
| |
| |sort_order||varchar(64)|| || ||rand||
| |
| |-
| |
| |sort_desc||enum('Y','N')|| || ||N||
| |
| |-
| |
| |text_before_link||varchar(128)|| || ||<nowiki><li></nowiki>||
| |
| |-
| |
| |text_after_link||varchar(128)|| || ||<nowiki><br /></nowiki>||
| |
| |-
| |
| |text_after_all||varchar(128)|| || ||<nowiki></li></nowiki>||
| |
| |-
| |
| |list_limit||int(11)|| || ||-1||
| |
| |}
| |
|
| |
|
| |
| ==表格: wp_links==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |link_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |link_url||varchar(255)|| || || ||
| |
| |-
| |
| |link_name||varchar(255)|| || || ||
| |
| |-
| |
| |link_image||varchar(255)|| || || ||
| |
| |-
| |
| |link_target||varchar(25)|| || || ||
| |
| |-
| |
| |link_category||bigint(20)|| ||IND||0||FK->wp_linkcategories.cat_id
| |
| |-
| |
| |link_description||varchar(255)|| || || ||
| |
| |-
| |
| |link_visible||enum('Y','N')|| ||IND||Y||
| |
| |-
| |
| |link_owner||int(11)|| || ||1||
| |
| |-
| |
| |link_rating||int(11)|| || ||0||
| |
| |-
| |
| |link_updated||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |link_rel||varchar(255)|| || || ||
| |
| |-
| |
| |link_notes||mediumtext|| || || ||
| |
| |-
| |
| |link_rss||varchar(255)|| || || ||
| |
| |}
| |
|
| |
|
| |
| ==表格: wp_options==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |option_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |blog_id||int(11)|| ||PRI||0||
| |
| |-
| |
| |option_name||varchar(64)|| ||PRI&IND|| ||
| |
| |-
| |
| |option_can_override||enum('Y','N')|| || ||Y||
| |
| |-
| |
| |option_type||int(11)|| || ||1||
| |
| |-
| |
| |option_value||longtext|| || || ||
| |
| |-
| |
| |option_width||int(11)|| || ||20||
| |
| |-
| |
| |option_height||int(11)|| || ||8||
| |
| |-
| |
| |option_description||tinytext|| || || ||
| |
| |-
| |
| |option_admin_level||int(11)|| || ||1||
| |
| |-
| |
| |autoload||enum('yes','no')|| || ||yes||
| |
| |}
| |
| ==表格: wp_post2cat==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |rel_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |post_id||bigint(20)|| ||IND Pt1||0||FK->wp_posts.ID
| |
| |-
| |
| |category_id||bigint(20)|| ||IND Pt2||0||FK->wp_categories.cat_ID
| |
| |}
| |
|
| |
|
| |
| ==表格: wp_postmeta==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |meta_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |post_id||bigint(20)|| ||IND||0||FK->wp_posts.ID
| |
| |-
| |
| |meta_key||varchar(255)||YES||IND||NULL||
| |
| |-
| |
| |meta_value||longtext||YES|| ||NULL||
| |
| |}
| |
|
| |
|
| |
| ==表格: wp_posts==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |ID||bigint(20) unsigned|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |post_author||bigint(20)|| || ||0||FK->wp_users.ID
| |
| |-
| |
| |post_date||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |post_date_gmt||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |post_content||longtext|| || || ||
| |
| |-
| |
| |post_title||text|| || || ||
| |
| |-
| |
| |post_category||int(4)|| || ||0||FK->wp_categories.cat_ID
| |
| |-
| |
| |post_excerpt||text|| || || ||
| |
| |-
| |
| |post_status||enum('publish','draft','private','static','object', 'attachment')|| ||IND||publish||
| |
| |-
| |
| |comment_status||enum('open','closed','registered_only')|| || ||open||
| |
| |-
| |
| |ping_status||enum('open','closed')|| || ||open||
| |
| |-
| |
| |post_password||varchar(20)|| || || ||
| |
| |-
| |
| |post_name||varchar(200)|| ||IND|| ||
| |
| |-
| |
| |to_ping||text|| || || ||
| |
| |-
| |
| |pinged||text|| || || ||
| |
| |-
| |
| |post_modified||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |post_modified_gmt||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |post_content_filtered||text|| || || ||
| |
| |-
| |
| |post_parent||bigint(20)|| || ||0||FK->wp_posts.ID
| |
| |-
| |
| |guid||varchar(255)|| || || ||
| |
| |-
| |
| |menu_order||int(11)|| || ||0||
| |
| |-
| |
| |post_type||varchar(100)|| || || ||
| |
| |-
| |
| |post_mime_type||varchar(100)|| || || ||
| |
| |-
| |
| |comment_count||bigint(20)|| || ||0||
| |
| |}
| |
|
| |
| ==表格: wp_usermeta==
| |
| (Added to WP 2.0)
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |umeta_id||bigint(20)|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |user_id||bigint(20)|| || ||'0'||FK->wp_users.ID
| |
| |-
| |
| |meta_key||varchar(255)|| ||IND||NULL||
| |
| |-
| |
| |meta_value||longtext|| ||IND||NULL||
| |
| |}
| |
|
| |
|
| |
| ==表格: wp_users==
| |
| {| table width="90%" border=1
| |
| !Field!!Type!!Null!!Key!!Default!!Extra
| |
| |-
| |
| |ID||bigint(20) unsigned|| ||PRI||NULL||auto_increment
| |
| |-
| |
| |user_login||varchar(60)|| ||UNI & IND|| ||
| |
| |-
| |
| |user_pass||varchar(64)|| || || ||
| |
| |-
| |
| |user_nicename||varchar(50)|| || || ||
| |
| |-
| |
| |user_email||varchar(100)|| || || ||
| |
| |-
| |
| |user_url||varchar(100)|| || || ||
| |
| |-
| |
| |user_registered||datetime|| || ||0000-00-00 00:00:00||
| |
| |-
| |
| |user_level||int(2) unsigned|| || ||0||
| |
| |-
| |
| |user_activation_key||varchar(60)|| || || ||
| |
| |-
| |
| |user_status||int(11)|| || ||0||
| |
| |-
| |
| |display_name||varchar(250)|| || || ||
| |
| |}
| |
|
| |
| |} | | |} |